Re: RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread Chen Liang
On Wed, 2 Oct 2024 07:53:44 GMT, Shaojin Wen wrote: > A small optimization to the RawBytecodeHelper::next method > * Remove `len <= 0` once > * merge store opcode and isWide Marked as reviewed by liach (Reviewer). This patch is neutral for startup benchmark. Good if it improves the repeated JM

Re: RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread Chen Liang
On Wed, 2 Oct 2024 19:59:07 GMT, ExE Boss wrote: >> The checkSpecialInstruction has already added the 'len <= 0' process, so >> there is no need to check 'len <= '0' again. > > `checkSpecialInstruction` will return `-1` in the following cases: > * `code == WIDE` and `bci + 1 >= end` > * `code ==

Re: RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread ExE Boss
On Wed, 2 Oct 2024 13:29:22 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/RawBytecodeHelper.java >> line 449: >> >>> 447: } >>> 448: >>> 449: if ((nextBci += len) > end) { >> >> This change makes it that `nextBci` will no longer monotonical

Re: RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread Shaojin Wen
On Wed, 2 Oct 2024 13:28:24 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/RawBytecodeHelper.java >> line 350: >> >>> 348: */ >>> 349: public boolean isWide() { >>> 350: return (opcode & (WIDE << 8)) != 0; >> >> Suggestion: >> >> re

Re: RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread Shaojin Wen
On Wed, 2 Oct 2024 11:09:52 GMT, ExE Boss wrote: >> A small optimization to the RawBytecodeHelper::next method >> * Remove `len <= 0` once >> * merge store opcode and isWide > > src/java.base/share/classes/jdk/internal/classfile/impl/RawBytecodeHelper.java > line 350: > >> 348: */ >> 349:

Re: RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread ExE Boss
On Wed, 2 Oct 2024 07:53:44 GMT, Shaojin Wen wrote: > A small optimization to the RawBytecodeHelper::next method > * Remove `len <= 0` once > * merge store opcode and isWide src/java.base/share/classes/jdk/internal/classfile/impl/RawBytecodeHelper.java line 350: > 348: */ > 349: publi

RFR: 8341415: Optimize RawBytecodeHelper::next

2024-10-02 Thread Shaojin Wen
A small optimization to the RawBytecodeHelper::next method * Remove `len <= 0` once * merge store opcode and isWide - Commit messages: - merge store opcode & isWide - optimize RawBytecodeHelper::next Changes: https://git.openjdk.org/jdk/pull/21300/files Webrev: https://webrevs.op