Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Mandy Chung
On Mon, 29 Apr 2024 12:39:17 GMT, Claes Redestad wrote: >> I'm looking at ways at reducing/eliminating startup overheads the classfile >> API in preparation of #17108, and have pushed a series of enhancements to >> that effect already. This PR is a collection of minor improvements which add >>

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Claes Redestad
On Mon, 29 Apr 2024 17:45:55 GMT, Mandy Chung wrote: > The changes look good to me but I wonder if the non-zero length check before > calling `arraycopy` really needed? That seems to add some noise to the code. I recall benchmarking similar code in `MethodType` extensively, and found that it h

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Mandy Chung
On Mon, 29 Apr 2024 12:39:17 GMT, Claes Redestad wrote: >> I'm looking at ways at reducing/eliminating startup overheads the classfile >> API in preparation of #17108, and have pushed a series of enhancements to >> that effect already. This PR is a collection of minor improvements which add >>

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Chen Liang
On Mon, 29 Apr 2024 14:22:22 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/lang/constant/ConstantDescs.java line 178: >> >>> 176: >>> 177: private static final ClassDesc[] INDY_BOOTSTRAP_ARGS = { >>> 178: CD_MethodHandles_Lookup, >> >> Can these fields be @Stab

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Claes Redestad
On Mon, 29 Apr 2024 14:16:34 GMT, Per Minborg wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplified void check > > src/java.base/share/classes/java/lang/constant/ConstantDescs.java line 178: > >> 176: >> 1

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Per Minborg
On Mon, 29 Apr 2024 12:39:17 GMT, Claes Redestad wrote: >> I'm looking at ways at reducing/eliminating startup overheads the classfile >> API in preparation of #17108, and have pushed a series of enhancements to >> that effect already. This PR is a collection of minor improvements which add >>

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Chen Liang
On Mon, 29 Apr 2024 12:39:17 GMT, Claes Redestad wrote: >> I'm looking at ways at reducing/eliminating startup overheads the classfile >> API in preparation of #17108, and have pushed a series of enhancements to >> that effect already. This PR is a collection of minor improvements which add >>

Re: RFR: 8331264: Reduce java.lang.constant initialization overhead [v3]

2024-04-29 Thread Claes Redestad
> I'm looking at ways at reducing/eliminating startup overheads the classfile > API in preparation of #17108, and have pushed a series of enhancements to > that effect already. This PR is a collection of minor improvements which add > up to a 1.5% reduction in retired instructions - or a 5% redu