> This is an optimization for decimal Integer.parseInt and Long.parseLong, > which improves performance by about 10%. The optimization includes: > 1. Improve performance by parsing 2 numbers at a time, which has performance > improvements for numbers with length >= 3. > 2. It uses charAt(0) for the first number. Assuming that the optimization can > eliminate boundary checks, this will be more friendly to parsing numbers with > length 1. > 3. It removes the reliance on the Character.digit method and eliminates the > reliance on the CharacterDataLatin1#DIGITS cache array, which avoids > performance degradation caused by cache misses.
Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: multiply 10 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/22919/files - new: https://git.openjdk.org/jdk/pull/22919/files/0b04a706..a6d98468 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=22919&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22919&range=10-11 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/22919.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22919/head:pull/22919 PR: https://git.openjdk.org/jdk/pull/22919