JDK-8350468 : x86: Improve implementation of vectorized numberOfLeadingZeros for int and long
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-02-21
  • Updated: 2025-11-19
  • Resolved: 2025-11-10
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 26
26 b24Fixed
Related Reports
Causes :  
Relates :  
Description
Currently, the vectorized assembly for Long.numberOfLeadingZeros does not use the same floating point exponent trick that the integer variant uses, which emits fewer vector operations. Furthermore, the implementation of Integer.numberOfLeadingZeros could be improved to use fewer vector operations, as discussed here: https://github.com/openjdk/jdk/pull/23579#issuecomment-2661332497
Comments
Changeset: f77a5117 Branch: master Author: Jasmine Karthikeyan <jkarthikeyan@openjdk.org> Date: 2025-11-10 06:16:02 +0000 URL: https://git.openjdk.org/jdk/commit/f77a5117db2d01a935762e948aef2d0ade3512a3
10-11-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26610 Date: 2025-08-04 02:20:31 +0000
04-08-2025