In BufferedReader.readLine and other similar scenarios, we need to use StringBuilder.append(char[]) to build the string.
~RogerRiggs completed the optimization when the encoder is LATIN1 in PR #24967. This PR continues to complete the optimization when the encoder is UTF16.
For these scenarios, we can use Unsafe.copyMemory instead of the character copy of the char-by-char loop to improve the speed.
~RogerRiggs completed the optimization when the encoder is LATIN1 in PR #24967. This PR continues to complete the optimization when the encoder is UTF16.
For these scenarios, we can use Unsafe.copyMemory instead of the character copy of the char-by-char loop to improve the speed.
- links to
-
Review(master) openjdk/jdk/24773