Thought experiment about strings

Are you asking what would the performance and memory characteristics be if java.util.String was implemented as a Clojure PersistentVector of bytes?

I think it be slower and use more memory, because vectors still need to box their elements. So using an array of bytes seems much faster.

1 Like