On Wed, 28 Jul 2021 09:29:25 GMT, Wu Yan <wu...@openjdk.org> wrote: > > We are testing on HiSilicon TSV110, maybe we can enable this optimization by > default on the verified platforms.
We don't really want to have different implementations for each microarchitecture, that would be a testing nightmare. The existing stub uses prefetch instructions if `SoftwarePrefetchHintDistance >= 0` but the new LDP version doesn't. Did you find there's no benefit to that? Adding prefetches was one of the reasons to introduce the separate stub for long strings, see the mail below: https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-April/028888.html It seems the existing code was tuned for Thunder X/X2 so perhaps that's why Andrew sees little improvement there with the new version. What testing have you done besides benchmarking? The patch linked above had at least two subtle bugs in corner cases. ------------- PR: https://git.openjdk.java.net/jdk/pull/4722