On Thu, 9 Feb 2023 11:39:18 GMT, Claes Redestad <redes...@openjdk.org> wrote:

> Yes, I'll file a PR to see if we can make `startsWith` a bit sharper

Thanks! I pushed the change to ZipCoder.compare.

> In addition to - or instead of - an `equals` shortcut then if coders are the 
> same we could use `ArraysSupport.mismatch` which should get similar speed and 
> help more generally.

..and if String had (an optimized) mismatch method, then I bet all or most of 
the comparison methods (equals, compareTo, endsWith, startsWith, regionMatches) 
could delegate to that  :-)

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

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

Reply via email to