4 ms·
> Because each element requires at least a 16 byte representation, both tiny and repeated short strings use more memory than they otherwise would. In a wider v
by JdeBP 1y ago
> Because each element requires at least a 16 byte representation, both tiny and repeated short strings use more memory than they otherwise would.
In a wider view, that depends. If one is using a general-purpose heap for string storage and a 64-bit instruction set architecture, the heap is often aligning and padding out allocations to such multiples already.