RFR: 8340232: Optimize DataInputStream::readUTF
Shaojin Wen
swen at openjdk.org
Tue Sep 17 03:29:30 UTC 2024
Similar to ObjectInputStream, use JLA.countPositives and JLA.inflateBytesToChars to speed up readUTF
-------------
Commit messages:
- suggestion from @liach
- optimize for ascii
- only allocate the char array if we have non-ascii
- optimize DataOutputStream::readUTF
Changes: https://git.openjdk.org/jdk/pull/20903/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20903&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8340232
Stats: 42 lines in 1 file changed: 28 ins; 2 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/20903.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20903/head:pull/20903
PR: https://git.openjdk.org/jdk/pull/20903
More information about the core-libs-dev
mailing list