<i18n dev> RFR: 8317980: Optimization for Integer.parseInt and Long.parseLong

Shaojin Wen duke at openjdk.org
Fri Jul 12 23:59:16 UTC 2024


Currently, about 25% of the time spent by the Integer.parseInt and Long.parseLong methods is spent on the Character.digit method.

The Character.digit method is common to all radixes. We can use a digit method optimized for Latin1 encoding radix 10 to improve the performance of Integer.parseInt and Long.parseLong methods.

-------------

Commit messages:
 - optimize parseInt & parseLong

Changes: https://git.openjdk.org/jdk/pull/20168/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20168&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317980
  Stats: 126 lines in 6 files changed: 56 ins; 36 del; 34 mod
  Patch: https://git.openjdk.org/jdk/pull/20168.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20168/head:pull/20168

PR: https://git.openjdk.org/jdk/pull/20168


More information about the i18n-dev mailing list