Re: RFR: 8325169: Reduce String::indexOf overheads [v2]

2024-02-03 Thread Claes Redestad
On Fri, 2 Feb 2024 20:53:14 GMT, Claes Redestad wrote: >> This patch streamlines and specializes various `String::indexOf` methods. >> Mainly avoids the need for clamping and doing checks that are redundant in >> almost all cases, moving the checks to the API boundary where they are >>

Re: RFR: 8325169: Reduce String::indexOf overheads [v2]

2024-02-02 Thread Claes Redestad
On Fri, 2 Feb 2024 16:40:45 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/String.java line 2506: >> >>> 2504: fromIndex = Math.max(0, fromIndex); >>> 2505: return isLatin1() ? StringLatin1.indexOf(value, ch, >>> fromIndex, value.length) >>> 2506:

Re: RFR: 8325169: Reduce String::indexOf overheads [v2]

2024-02-02 Thread Raffaello Giulietti
On Fri, 2 Feb 2024 20:53:14 GMT, Claes Redestad wrote: >> This patch streamlines and specializes various `String::indexOf` methods. >> Mainly avoids the need for clamping and doing checks that are redundant in >> almost all cases, moving the checks to the API boundary where they are >>

Re: RFR: 8325169: Reduce String::indexOf overheads [v2]

2024-02-02 Thread Claes Redestad
On Fri, 2 Feb 2024 20:53:14 GMT, Claes Redestad wrote: >> This patch streamlines and specializes various `String::indexOf` methods. >> Mainly avoids the need for clamping and doing checks that are redundant in >> almost all cases, moving the checks to the API boundary where they are >>

Re: RFR: 8325169: Reduce String::indexOf overheads [v2]

2024-02-02 Thread Claes Redestad
> This patch streamlines and specializes various `String::indexOf` methods. > Mainly avoids the need for clamping and doing checks that are redundant in > almost all cases, moving the checks to the API boundary where they are > needed. > > This improves performance both at peak and during