RFR: AARCH64: optimize string compare intrinsic

Dmitrij Pochepko dmitrij.pochepko at bell-sw.com
Sat Apr 28 18:29:09 UTC 2018

Hi all,

please review patch for  8202326: AARCH64: optimize string compare intrinsic

This patch introduces string compareTo stub, which uses large loops with 
prefetch instructions. Stub is called for long strings and improves 
String::compareTo up to 4 times on systems without hardware prefetching 
(ThunderX) and up to 2 times on systems with hardware prefetching 
(ThunderX2). Also inlined code is re-arranged with more optimal 
pipelining, which helps in-order systems, so small strings are also 
slightly improved.
There are no noticeable regressions according to benchmark results.

I created benchmark to measure improvement: 

Execution matrix is large and can be seen here: 

Raw results are *.txt files here: 

webrev: http://cr.openjdk.java.net/~dpochepk/8202326/webrev.01/

CR: https://bugs.openjdk.java.net/browse/JDK-8202326

testing: I run jtreg hotspot tests: compiler/* gc/* runtime/* using 
fastdebug build and found no new failures. I also run long "bruteforce" 
test which checks all combinations of different character index for all 
strings up to size 512: 

Additional note: this patch depends on zip2 instruction encoding fix: 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180428/3c344f03/attachment.html>

More information about the hotspot-compiler-dev mailing list