RFR: 8341141: Optimize DirectCodeBuilder [v4]
Claes Redestad
redestad at openjdk.org
Sun Sep 29 18:36:35 UTC 2024
On Sun, 29 Sep 2024 13:35:14 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> Some DirectCodeBuilder related optimizations to improve startup and running performance:
>> 1. Merge calls, merge writeU1 and writeU2 into writeU3
>> 2. Merge calls, merge writeU1 and writeIndex operations
>> 3. Directly use writeU1 instead of writeBytecode
>> 4. Rewrite the implementation of load and store
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
>
> use array instead of ArrayList
src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java line 115:
> 113:
> 114: @ForceInline
> 115: public void writeU2(int x1, int x2) {
Perhaps a more descriptive name would be `writeU1U1` here, then `writeU1U2`, `writeU1U1U1` and `writeU2U2` for the next methods, respectively? Either way these methods will be a bit of an eye-sore, but let's at least iron out any ambiguities.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21243#discussion_r1780105574
More information about the core-libs-dev
mailing list