3 ms·
I guess at the time the JVM was less aggressively optimised, and UCS-2 was a single simple approach that represented all required code points. Anything else wou
by chrisseaton 12y ago
I guess at the time the JVM was less aggressively optimised, and UCS-2 was a single simple approach that represented all required code points. Anything else would probably have looked like a micro-optimisation.
- agumonkey 12y agoAlso fit well with World Wide Web + Write Once Run Anywhere : any OS in any locale.
- MrBuddyCasino 12y agoBut back then we had less memory, and Java was never that memory efficient to begin with. I wouldn't say double-digit memory savings are in the realm of overly pedantic micro optimisations. One language whose name escapes me took an approach where the internal representation is always unicode codepoints, and Strings have methods for projecting those .toUTF8() or whatever to interact with the outside world - I liked that a lot due to its simplicity, anyone knows which language that was?
- desdiv 12y agoAt the time UCS-2 was the best thing they could choose from. Remember, Java predates UTF-8.