On Mon, 2 Nov 2026 09:38:00 GMT, Larry <[email protected]> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64_adler.cpp line 167:
>> 
>>> 165:   if (VM_Version::supports_avx512vl()) {
>>> 166:     // AVX2 performs better for smaller inputs because of leaner post 
>>> loop reduction sequence..
>>> 167:     __ cmpl(s, MAX2(128, CopyAVX3Threshold));
>> 
>> `CopyAVX3Threshold` is 0 by default on Zen 5 and Intel server parts with 
>> `serialize`, so chunks over 128 bytes still take the AVX-512 loop. On a 
>> 9950X3D2, 256 to 65536 bytes are within 1.3% of baseline with default flags, 
>> and 40 to 88% faster with `-XX:CopyAVX3Threshold=8192`. What do you get on 
>> Granite Rapids with default flags?
>
> Here are the results on Intel Xeon 6980P (Granite Rapids) 
> #### with default flags:
>   Size | Baseline | Patched | Delta
>   -- | -- | -- | --
>   1 | 104325.5 | 167061.5 | +60.1%
>   2 | 101708.2 | 159783.6 | +57.1%
>   4 | 94652.5 | 145264.7 | +53.5%
>   8 | 84135.6 | 122935.7 | +46.1%
>   15 | 69287.3 | 91524.2 | +32.1%
>   16 | 66872.3 | 161635.9 | +141.7%
>   24 | 56290.3 | 111302.9 | +97.7%
>   31 | 50366.9 | 84498.7 | +67.8%
>   32 | 54083.1 | 71421.1 | +32.1%
>   64 | 50034.2 | 70733.0 | +41.4%
>   256 | 33063.5 | 32400.1 | -2.0%
>   1024 | 15952.0 | 15967.3 | +0.1%
>   4096 | 4674.7 | 4669.7 | -0.1%
>   8192 | 2408.7 | 2469.6 | +2.5%
>   65536 | 317.1 | 335.5 | +5.8%
> 
> #### CopyAVX3Threshold=8192
>   
>   Size | Baseline | Patched | Delta
>   -- | -- | -- | --
>   256 | 30065.5 | 59974.6 | +99.5%
>   1024 | 14347.0 | 33659.3 | +134.6%
>   4096 | 4473.0 | 10687.9 | +138.9%
>   5552 | 3378.4 | 8130.8 | +140.7%
>   8192 | 2268.1 | 5496.8 | +142.4%
>   65536 | 291.5 | 565.4 | +94.0%
> 
> This patch is scoped to improving the AVX2 implementation, so I think the 
> Adler32 AVX2/AVX-512 dispatch should be handled in a separate issue. Would 
> you be willing to help create a follow-up JBS issue for this dispatch 
> question? I will track it and work on the follow-up.  
> Alternatively, if you prefer, I can address it in this issue.

Thanks, that matches Zen 5. A follow-up is fine, filed as JDK-8396416.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33338#discussion_r4442233101

Reply via email to