On Wed, 28 Jun 2023 17:53:04 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> 温绍锦 has updated the pull request incrementally with one additional commit 
>> since the last revision:
>> 
>>   postpone the division
>
> src/java.base/share/classes/java/lang/Integer.java line 478:
> 
>> 476: 
>> 477:         byte[] buf;
>> 478:         if (q1 == 0) {
> 
> You could postpone the division to compute `q1` later, and here test whether 
> `i < 1_000`.
> I've no statistics, but I guess it makes sense to optimize for tiny `int`s by 
> avoiding a division.

I have submitted the changes and updated the benchmark results, which shows an 
improvement.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14699#discussion_r1245940981

Reply via email to