JEP 315: Improve Aarch64 Intrinsics

OwnerDmitrij Pochepko
StatusClosed / Delivered
Componenthotspot / compiler
Discussionhotspot dash compiler dash dev at openjdk dot java dot net
Reviewed byMikael Vidstedt, Vladimir Kozlov
Endorsed byVladimir Kozlov
Created2017/10/10 12:40
Updated2023/05/03 08:21


Improve the existing string and array intrinsics, and implement new intrinsics for the java.lang.Math sin, cos and log functions, on AArch64 processors.



Specialized CPU architecture-specific code patterns improve the performance of user applications and benchmarks.


Intrinsics are used to leverage CPU architecture-specific assembly code which is executed instead of generic Java code for a given method to improve performance. While most of the intrinsics are already implemented in AArch64 port, optimized intrinsics for the following java.lang.Math methods are still missing:

This JEP is intended to cover this gap by implementing optimized intrinsics for these methods.

At the same time, while most of the intrinsics are already implemented in the AArch64 port, the current implementation of some intrinsics may not be optimal. Specifically, some intrinsics for AArch64 architectures may benefit from software prefetching instructions, memory address alignment, instructions placement for multi-pipeline CPUs, and the replacement of certain instruction patterns with faster ones or with SIMD instructions.

This includes (but is not limited to) such typical operations as String::compareTo, String::indexOf, StringCoding::hasNegatives, Arrays::equals, StringUTF16::compress, StringLatin1::inflate, and various checksum calculations.

Depending on the intrinsic algorithm, the most common intrinsic use case, and CPU specifics, the following changes may be considered:


Risks and Assumptions