RFR: 8310929: Optimization for Integer.toString [v12]
温绍锦
duke at openjdk.org
Tue Jul 18 01:55:14 UTC 2023
On Tue, 18 Jul 2023 01:38:47 GMT, Chen Liang <liach at openjdk.org> wrote:
>> The value range of the r variable is 0-99, and the length of PACKED_DIGITS is 100, There is no need to check the array boundary here.
>
> I think he means to check the `charPos` to ensure it is not out of bounds.
Oh, I see, charPos needs to do bound checks, I added assert with reference to the implementation of StringUTF16#putChar, is this safe enough?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14699#discussion_r1266090826
More information about the core-libs-dev
mailing list