On Mon, 13 Feb 2023 09:59:24 GMT, Claes Redestad <redes...@openjdk.org> wrote:

> We can improve various String methods such as `startsWith`, `endsWith` and 
> `regionMatches` by leveraging the intrinsified mismatch methods in 
> `ArraysSupport`.

src/java.base/share/classes/java/lang/String.java line 2272:

> 2270:             toffset <<= coder;
> 2271:             return ArraysSupport.mismatch(ta, toffset,
> 2272:                     pa, 0, pc) < 0;

`offset <<= coder` is only obvious if the reader knows the value of LATIN1, 
maybe it would be simpler to read if you kept "int to"?

-------------

PR: https://git.openjdk.org/jdk/pull/12528

Reply via email to