4 ms·
I'm curious why Java doesn't use UTF-8 encoding by default; that would offer much of the memory savings the parent poster is talking about, if the data is mostl
by neilc 18y ago
I'm curious why Java doesn't use UTF-8 encoding by default; that would offer much of the memory savings the parent poster is talking about, if the data is mostly ASCII anyway.
- axod 18y agobecause it'd have an extreme effect on performance? UTF-8 is great in terms of size, but terrible in terms of speed.
- neilc 18y agoHow "extreme" are we talking about? Some empirical data would be helpful. I'd also be curious to see data about what % of the characters in all the strings in a typical Java program aren't in 7-bit ASCII. I wouldn't be surprised if 7-bit ASCII characters are a large majority of the total, which makes the case for UTF-16 less compelling.