[10] RFR: 8189101 - AARCH64: AARCH64: string compare intrinsic doesn't use prefetch

Dmitrij Pochepko dmitrij.pochepko at bell-sw.com
Mon Oct 30 18:20:06 UTC 2017


this is a second pre-review as part of JEP “Improve performance of 
String and Array operations on AArch64” for another improved intrinsics 
to get early feedback.

Please pre-review patch for 8189101 - “AARCH64: AARCH64: string compare 
intrinsic doesn't use prefetch”

This patch moves code for long string processing to a stub and 
reorganize it. For large strings code was re-organized, added large 
64-byte unrolled loops and prefetch. Webrev is available at [1].
Surpisingly, it helps a bit for small strings, because code for string 
comparison node is now shorter, so, less icache lines needed to be 
populated to execute it.

A benchmark was developed to measure performance [2], which contains 4 
cases with various sizes: LL (latin1 vs latin1), LU (latin1 vs utf), UL 
(utf vs latin1) and UU (utf vs utf). I can see up to x5 performance on 
systems without h/w prefetcher (ThunderX) and up to 40% improvement on 
system with h/w prefetcher(Cortex A53).

Raw performance numbers are at [3]. Charts for performance numbers above 
are: Cortex A53 [4] and ThunderX [5].

Testing: I've run java/lang/String (contains test for String::compareTo 
method) jtreg tests with both Xmixed and Xcomp modes and found no 

Any additional numbers on other systems are welcome, as well as early 
feedback on the code.

[1] http://cr.openjdk.java.net/~dpochepk/8189101/webrev/
[2] http://cr.openjdk.java.net/~dpochepk/8189101/StringCompareBench.java
[3] http://cr.openjdk.java.net/~dpochepk/8189101/strCmp_T88.txt and 
[4] http://cr.openjdk.java.net/~dpochepk/8189101/R_Pi_LL.png 
http://cr.openjdk.java.net/~dpochepk/8189101/R_Pi_UL.png and 
[5] http://cr.openjdk.java.net/~dpochepk/8189101/ThunderX_LL.png 
http://cr.openjdk.java.net/~dpochepk/8189101/ThunderX_LU.png and 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20171030/9570741f/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list