Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v5]

2024-04-27 Thread Claes Redestad
On Fri, 26 Apr 2024 22:27:43 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v5]

2024-04-26 Thread Mandy Chung
On Fri, 26 Apr 2024 22:27:43 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v5]

2024-04-26 Thread Chen Liang
On Fri, 26 Apr 2024 22:23:03 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v5]

2024-04-26 Thread Claes Redestad
> When analyzing (startup) performance of the Classfile API I found this > opportunity to further improve `MethodTypeDescImpl::descriptorString`. > > Performance improves across the board in existing microbenchmarks: > > Name >

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v4]

2024-04-26 Thread Chen Liang
On Fri, 26 Apr 2024 08:07:04 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v4]

2024-04-26 Thread Claes Redestad
On Fri, 26 Apr 2024 18:21:16 GMT, Mandy Chung wrote: > I am glad that this only focuses on the descriptor string as > `MethodTypeDesc::displayDescriptor` is typically used for debugging and > exception message and not performance-sensitive. Yes, which is why I'd really like to desugar it:

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v4]

2024-04-26 Thread Chen Liang
On Fri, 26 Apr 2024 08:07:04 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v4]

2024-04-26 Thread Mandy Chung
On Fri, 26 Apr 2024 08:07:04 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]

2024-04-26 Thread Claes Redestad
On Thu, 25 Apr 2024 23:03:58 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java line >> 181: >> >>> 179: sb.append(argType.descriptorString()); >>> 180: } >>> 181: desc = >>>

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]

2024-04-26 Thread Claes Redestad
On Thu, 25 Apr 2024 23:06:00 GMT, Chen Liang wrote: > For the precise-length approach, do you have the results? I guess if we can > avoid copying the stringbuilder array, we can make this even faster. Not sure what you mean - the latest performance numbers I posted are for the precise length

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v4]

2024-04-26 Thread Claes Redestad
> When analyzing (startup) performance of the Classfile API I found this > opportunity to further improve `MethodTypeDescImpl::descriptorString`. > > Performance improves across the board in existing microbenchmarks: > > Name >

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]

2024-04-25 Thread Chen Liang
On Thu, 25 Apr 2024 22:26:04 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]

2024-04-25 Thread Chen Liang
On Thu, 25 Apr 2024 22:57:50 GMT, Florent Guillaume wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Calculate length precisely > > src/java.base/share/classes/java/lang/constant/MethodTypeDescImpl.java line >

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]

2024-04-25 Thread Florent Guillaume
On Thu, 25 Apr 2024 22:26:04 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v3]

2024-04-25 Thread Claes Redestad
> When analyzing (startup) performance of the Classfile API I found this > opportunity to further improve `MethodTypeDescImpl::descriptorString`. > > Performance improves across the board in existing microbenchmarks: > > Name >

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Claes Redestad
On Thu, 25 Apr 2024 13:34:50 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Chen Liang
On Thu, 25 Apr 2024 13:34:50 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Claes Redestad
On Thu, 25 Apr 2024 13:35:59 GMT, Chen Liang wrote: > Do we have any research on the average length of method descriptor strings? I > wonder if manual pre-allocation works better (iterating all descriptor > strings, allocate the sum of their sizes plus 2 (for parentheses), as > descriptor

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Claes Redestad
On Thu, 25 Apr 2024 13:38:56 GMT, Viktor Klang wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> comma-separated > > src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java line 208: > >> 206:

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Viktor Klang
On Thu, 25 Apr 2024 13:34:50 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Chen Liang
On Thu, 25 Apr 2024 13:34:50 GMT, Claes Redestad wrote: >> When analyzing (startup) performance of the Classfile API I found this >> opportunity to further improve `MethodTypeDescImpl::descriptorString`. >> >> Performance improves across the board in existing microbenchmarks: >> >> Name

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Claes Redestad
> When analyzing (startup) performance of the Classfile API I found this > opportunity to further improve `MethodTypeDescImpl::descriptorString`. > > Performance improves across the board in existing microbenchmarks: > > Name >

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString [v2]

2024-04-25 Thread Claes Redestad
On Thu, 25 Apr 2024 11:11:48 GMT, Florent Guillaume wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> comma-separated > > src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java line 210: > >> 208:

Re: RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString

2024-04-25 Thread Florent Guillaume
On Thu, 25 Apr 2024 09:41:11 GMT, Claes Redestad wrote: > When analyzing (startup) performance of the Classfile API I found this > opportunity to further improve `MethodTypeDescImpl::descriptorString`. > > Performance improves across the board in existing microbenchmarks: > > Name

RFR: 8331114: Further improve performance of MethodTypeDesc::descriptorString

2024-04-25 Thread Claes Redestad
When analyzing (startup) performance of the Classfile API I found this opportunity to further improve `MethodTypeDescImpl::descriptorString`. Performance improves across the board in existing microbenchmarks: Name (descString) Cnt