3 ms·
As of Java 9 have uses one byte UTF-8 array instead UTF-16 chars internally. See: http://openjdk.java.net/jeps/254 http://openjdk.java.net/jeps/254
by kjeetgill 8y ago
As of Java 9 have uses one byte UTF-8 array instead UTF-16 chars internally.
See: http://openjdk.java.net/jeps/254 http://openjdk.java.net/jeps/254
- dwaite 8y agoIt is a Latin-1 byte array, not a UTF-8 array. This is because Java exposes some details like the length of the UTF-16 character array through the string api.
- TazeTSchnitzel 8y ago(And Latin-1 is a strict subset of Unicode, which means all the direct code point lookups are superfast, literally just a zero extension.)
- kjeetgill 8y agoAh, my bad. I stand corrected.