On Mon, 7 Oct 2024 20:03:29 GMT, Chen Liang <li...@openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   fix merge error
>
> src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java
>  line 989:
> 
>> 987:     @Override
>> 988:     public CodeBuilder aload(int slot) {
>> 989:         if (slot >= 0 && slot <= 3) {
> 
> Should we use `if ((slot & ~3) != 0)` for shorter bytecode? #21367

While fun, I wonder if such bit-fiddling optimizations obfuscate the code more 
than it helps performance. Would be good with some supporting evidence that it 
1) helps interpreted performance and 2) that all JITs recognize and optimize 
this pattern well and without surprises.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21243#discussion_r1790909547

Reply via email to