On Fri, 30 Aug 2024 05:13:33 GMT, Shaojin Wen <s...@openjdk.org> wrote:

>> A small optimization to improve the performance of 
>> jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot
>
> Shaojin Wen has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Suggestions from @cl4es

What I noticed is that in all but one place where we call `slotSize` we're 
dealing parameters which can't be void. So specializing and having a 
`paramSlotSize(ClassDesc desc) { return isDoubleSlot(desc) ? 2 : 1; }` would 
perhaps be better.

As always it's good to annotate performance enhancements like these with some 
microbenchmark data - if not else to indicate how you've evaluated the gain.

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

PR Comment: https://git.openjdk.org/jdk/pull/20747#issuecomment-2326361775

Reply via email to