JDK-8187472 : AARCH64: array_equals intrinsic doesn't use prefetch for large arrays
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2017-09-12
  • Updated: 2018-05-25
  • Resolved: 2018-04-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b10Fixed
Related Reports
Blocks :  
Relates :  
Description
Current array_equals implementation doesn't used prefetch instruction(prfm) in case of large arrays. It can significantly improve performance in case of large and equal arrays(or arrays which are different at the end).
Comments
ar_eq_T88.txt shows results with more sizes
11-10-2017

Attached array_equals_results.txt with results on ThunderX T88(system without h/w prefetcher). Results shows up to x6 improvement on large arrays. System with h/w prefetcher shows about x1.5 improvement.
10-10-2017

attached version rebased for consolidated repo
10-10-2017

final version: 2.6d
10-10-2017

webrev of 2.6: http://cr.openjdk.java.net/~dpochepk/8187472/webrev.01/
12-09-2017

I've tried a number of versions, using different load instructions(ldr, ldp, ld1(simd)), different comparison instructions(eor/cbnz, cmp/br), various pipelining logic, various loop unrolling logic, various alignment for loads and found version 2.6 to be fastest amoung all. Attached all versions(some are just prototypes and may contain insignificant corner-case bugs). Also attached functional test (test.java), benchmark(ArrayEqualsBench.java) and comparison table (array_equals.ods)
12-09-2017