RFR: 8317980: Optimization for Integer.parseInt and Long.parseLong
Shaojin Wen
duke at openjdk.org
Thu Oct 12 09:22:11 UTC 2023
On Thu, 12 Oct 2023 09:10:30 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> This patch should have little impact on exception-path performance. Remember String concatenation is done with StringBuilder in java.base, so changing formatter to that might have some performance difference. However, the main overhead of exception was from creation and initialization of stack trace.; the new code was just copies of the existing generic-radix parseInt, except it has a more efficient way to obtain digits via a table.
>
> Let's not forget that `Character.digit()` has a pretty decent fast path for Latin1, including a 256 bytes lookup-table.
CharacterDataLatin1.digit is for multi-radix, and the performance when radix = 10 is not good enough.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16112#discussion_r1356538024
More information about the core-libs-dev
mailing list