Re: RFR: 8301958: Avoid Arrays.copyOfRange overhead in java.lang.String [v4]

2023-02-07 Thread Alan Bateman
On Tue, 7 Feb 2023 15:12:15 GMT, Claes Redestad wrote: >> This adds a local, specialized `copyBytes` method to `String` that avoids >> certain redundant range checks and clamping that JIT has issues removing >> fully. >> >> This has a small but statistically significant effect on `String` >>

Re: RFR: 8301958: Avoid Arrays.copyOfRange overhead in java.lang.String [v4]

2023-02-07 Thread Claes Redestad
> This adds a local, specialized `copyBytes` method to `String` that avoids > certain redundant range checks and clamping that JIT has issues removing > fully. > > This has a small but statistically significant effect on `String` > microbenchmarks, eg.: > > Baseline > > Benchmark