2 ms·
> But there are space optimizations on the Python string object which make it so it doesn't waste that much space Except it does not help. When you render out
by the_mitsuhiko 11y ago
> But there are space optimizations on the Python string object which make it so it doesn't waste that much space
Except it does not help. When you render out a template it starts out as latin1, then the first time it hits a unicode char the whole thing re-encodes into ucs2 and then when it sees an emoji it re-encodes to ucs4. In practical terms you will see UCS2 and UCS4 all the time.