On Mon, 26 Aug 2024 12:07:02 GMT, Per Minborg <pminb...@openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Add a comment about the old switch type
>
> Here is what it looks like for Windows x64:
> 
> ![image](https://github.com/user-attachments/assets/53b6530c-76b7-47f1-ae02-124d16351d45)

> Hi @minborg as #16760 has shown, handling small chunks in Java can be 
> beneficial, but AFAIK Unsafe::setMemory has been intrinsified already at 
> #18555, so I'm surprised that should provide some benefit now.

I think the cost of transitioning to native code is what gives us this 
opportunity. So, there is always a fairly constant performance hit to 
transition to native code. Once native, the actual filling performance is way 
better in native code. The cut-off size lies appears to be close to 8 bytes and 
hence, this PR handles 0 <= length < 7 specifically.

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

PR Comment: https://git.openjdk.org/jdk/pull/20712#issuecomment-2310232722

Reply via email to