RFR: JDK-8300808: Accelerate Base64 on x86 for AVX2 [v15]

Claes Redestad redestad at openjdk.org
Tue Feb 14 15:22:08 UTC 2023


On Tue, 14 Feb 2023 15:03:50 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 2699:
>> 
>>> 2697:     __ addptr(dest, 0x18);
>>> 2698:     __ subl(length, 0x20);
>>> 2699:     __ jcc(Assembler::lessEqual, L_tailProc);
>> 
>> This could be Assembler::less instead of Assembler::lessEqual.
>
> Why?  There is no performance difference and the intent is clear.  Is this just a "style" thing?

I think with `lessEqual` we'll jump to `L_tailProc` for the final 32-byte chunk in inputs that are divisible by 32 (starting from 64), no? Using `less` avoids that, while not affecting performance of any other inputs.

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

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


More information about the core-libs-dev mailing list