JEP 315: Improve Aarch64 Intrinsics (original) (raw)

Owner Dmitrij Pochepko
Type Feature
Scope Implementation
Status Closed / Delivered
Release 11
Component hotspot / compiler
Discussion hotspot dash compiler dash dev at openjdk dot java dot net
Effort L
Duration L
Reviewed by Mikael Vidstedt, Vladimir Kozlov
Endorsed by Vladimir Kozlov
Created 2017/10/10 12:40
Updated 2023/05/03 08:21
Issue 8189104

Summary

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

Non-Goals

Motivation

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

Description

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:

Testing

Risks and Assumptions