Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v4]

2021-08-12 Thread Alan Bateman
On Wed, 11 Aug 2021 21:40:52 GMT, Claes Redestad wrote: >> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to >> avoid potentially getting two bounds checks in the UTF-16 case. Problem is >> this optimization cause a regression since `StringUTF16.charAt(..)` checks >>

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v4]

2021-08-11 Thread Naoto Sato
On Wed, 11 Aug 2021 21:40:52 GMT, Claes Redestad wrote: >> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to >> avoid potentially getting two bounds checks in the UTF-16 case. Problem is >> this optimization cause a regression since `StringUTF16.charAt(..)` checks >>

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v4]

2021-08-11 Thread Claes Redestad
> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to > avoid potentially getting two bounds checks in the UTF-16 case. Problem is > this optimization cause a regression since `StringUTF16.charAt(..)` checks > `index` against the length of the `value` array and not