Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-17 Thread Chen Liang
On Wed, 17 May 2023 13:28:53 GMT, Adam Sotona wrote: >> Good, I think it makes perfect sense for the MTD parameter list to be >> immutable and shareable without copying. > > Thank you for the review. > Yes, I'm looking forward to see it together with Constants API improvements > in one benchama

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-17 Thread Adam Sotona
On Tue, 16 May 2023 22:00:18 GMT, Claes Redestad wrote: >> I plan to share a backing list in #13186, with API additions so users can >> avoid copying their input immutable parameter list as well. I see no reason >> to use a direct array, for MTD is not passed to and used by the VM, unlike >> M

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-16 Thread Claes Redestad
On Tue, 16 May 2023 15:17:13 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/StackMapDecoder.java >> line 83: >> >>> 81: vtis = new >>> VerificationTypeInfo[methodType.parameterCount()]; >>> 82: } >>> 83: for(var arg : methodType.pa

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-16 Thread Chen Liang
On Tue, 16 May 2023 14:23:04 GMT, Claes Redestad wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> LinkedList replaced with ArrayList in benchmarks > > src/java.base/share/classes/jdk/internal/classfile/impl/StackMapD

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-16 Thread Claes Redestad
On Tue, 16 May 2023 08:17:02 GMT, Adam Sotona wrote: >> Following improvements implemented: >> - Switch over `String` replaced with switch single char >> - Binary search for frames in `StackMapGenerator` >> - `StackMapGenerator.rawHandlers` with pre-calculated offsets >> - `ClassEntry` is caching

Re: RFR: 8306842: Classfile API performance improvements [v7]

2023-05-16 Thread Adam Sotona
> Following improvements implemented: > - Switch over `String` replaced with switch single char > - Binary search for frames in `StackMapGenerator` > - `StackMapGenerator.rawHandlers` with pre-calculated offsets > - `ClassEntry` is caching `ClassDesc` symbol > - Caching of type symbols in `NameAndT