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
- relates to
-
JDK-8349637 Integer.numberOfLeadingZeros outputs incorrectly in certain cases
-
- Resolved
-