Re: RFR: 8341581: Optimize BytecodeHelpers validate slot

2024-10-07 Thread Chen Liang
On Fri, 4 Oct 2024 23:49:42 GMT, Shaojin Wen wrote: > Use `slot & ~0xFF == 0` instead of `(slot & 0xFF) == slot` to reduce codeSize. > > The following is a comparison of the bytecode before and after the > modification. It can be seen that using `slot & ~0xFF == 0` will reduce one > iload oper

RFR: 8341581: Optimize BytecodeHelpers validate slot

2024-10-05 Thread Shaojin Wen
Use `slot & ~0xFF == 0` instead of `(slot & 0xFF) == slot` to reduce codeSize. The following is a comparison of the bytecode before and after the modification. It can be seen that using `slot & ~0xFF == 0` will reduce one iload operation. // (slot & 0xFF) == slot 56: iload_0 57: sipush