Summary: Enhanced random number generators were implemented as a part of JDK-8248862. Currently, it uses Math.multiplyHigh(), which can be further optimized by using Math.unsignedMultiplyHigh(). Also, x86 intrinsic support for Math.unsignedMultiplyHigh() was added as a part of recently closed JDK-8275167.
Problem: The proposed changes entails replacing Math.multiplyHigh() with Math.unsignedMultiplyHigh().
For example, in src/jdk.random/share/classes/jdk/random/L128X128MixRandom.java,
line 260: sh = (ML * sh) + (Math.multiplyHigh(ML, sl) + ((ML >> 63) & sl) + ((sl >> 63) & ML)) + sl + ah;
will be replaced as:
sh = (ML * sh) + (Math.unsignedMultiplyHigh(ML, sl) + ((ML >> 63) & sl) + ((sl >> 63) & ML)) + sl + ah;
The same changes shown above will be made in all the relevant files.
Issue Links: JDK-8248862, JDK-8275167