On Tue, 14 Feb 2023 01:48:37 GMT, Sandhya Viswanathan <sviswanat...@openjdk.org> wrote:
>> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add URL to microbenchmark > > src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 2399: > >> 2397: VM_Version::supports_avx512bw()) { >> 2398: __ cmpl(length, 31); // 32-bytes is break-even for AVX-512 >> 2399: __ jcc(Assembler::lessEqual, L_bruteForce); > > The avx2 code needs the length to be atleast 0x2c (44) bytes. We could > directly go to non-avx code instead of L_bruteForce here. We will save one > subtract/branch. Done. > src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 2658: > >> 2656: // Check for buffer too small (for algorithm) >> 2657: __ subl(length, 0x2c); >> 2658: __ 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? > 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? ------------- PR: https://git.openjdk.org/jdk/pull/12126