Re: RFR: 8291641: Optimize StackTraceElement.toString() [v3]

2022-08-02 Thread David Schlosnagle
On Tue, 2 Aug 2022 13:52:30 GMT, Quan Anh Mai wrote: >> David Schlosnagle has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Estimate length > > src/java.base/share/classes/java/lang/StackTraceElement.java line 365: > >> 363:

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v3]

2022-08-02 Thread Quan Anh Mai
On Tue, 2 Aug 2022 13:34:26 GMT, David Schlosnagle wrote: >> I would like to contribute an optimized version of >> `StackTraceElement#toString()` that uses a single StringBuilder throughout >> creation to avoid intermediate `String` allocations. >> `StackTraceElement#toString()` is used in a n

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v3]

2022-08-02 Thread David Schlosnagle
> I would like to contribute an optimized version of > `StackTraceElement#toString()` that uses a single StringBuilder throughout > creation to avoid intermediate `String` allocations. > `StackTraceElement#toString()` is used in a number of JDK code paths > including `Throwable#printStackTrace(