RFR: 8358179: Performance regression in Math.cbrt

Yudi Zheng yzheng at openjdk.org
Thu Jun 26 10:16:30 UTC 2025


On Wed, 25 Jun 2025 17:01:33 GMT, Mohamed Issa <missa at openjdk.org> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64_cbrt.cpp line 51:
>> 
>>> 49: ATTRIBUTE_ALIGNED(16) static const juint _ABS_MASK[] =
>>> 50: {
>>> 51:     4294967295, 2147483647
>> 
>> How about `0xffffffff, 0x7fffffff` instead.
>
> I agree it's better to use hex format, but the other constants are in decimal. So, I'd like to have a separate PR that covers all of them rather than having a mismatch between this mask and all the others.

We have done that in Graal port for the old constants
https://github.com/oracle/graal/blob/master/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64MathCbrtOp.java#L88-L218

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25962#discussion_r2168709047


More information about the hotspot-compiler-dev mailing list