Re: RFR: 8276904: Optional.toString() is unnecessarily expensive

2021-12-02 Thread Roger Riggs
On Wed, 10 Nov 2021 17:44:04 GMT, Eamonn McManus wrote: > Use string concatenation instead of `String.format`. Looks ok on the face of it. I would be useful to see the performance of the improvement. - PR: https://git.openjdk.java.net/jdk/pull/6337

Re: RFR: 8276904: Optional.toString() is unnecessarily expensive

2021-11-22 Thread Stuart Marks
On Wed, 10 Nov 2021 17:44:04 GMT, Eamonn McManus wrote: > Use string concatenation instead of `String.format`. I talked to Brian about this a bit. Changing `format` to concatenation is probably ok this case for two reasons: 1) it's the simplest possible such transformation, and as such it's

Re: RFR: 8276904: Optional.toString() is unnecessarily expensive

2021-11-10 Thread Brian Goetz
I would suggest that we hold this patch until the string interpolation JEP lands.  It will offer both better readability *and* better performance, and probably better to have one round of "replace all the toString implementations" than two? On 11/10/2021 1:04 PM, Eamonn McManus wrote: Use

RFR: 8276904: Optional.toString() is unnecessarily expensive

2021-11-10 Thread Eamonn McManus
Use string concatenation instead of `String.format`. - Commit messages: - 8276904: Optional.toString() is unnecessarily expensive Changes: https://git.openjdk.java.net/jdk/pull/6337/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=6337=00 Issue: