RFR: 8346567: Make Class.getModifiers() non-native [v2]
Chen Liang
liach at openjdk.org
Thu Feb 6 04:40:11 UTC 2025
On Wed, 5 Feb 2025 20:23:05 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Name Cnt Base Error Test Error Unit Change
>> getAppArrayModifiers 30 0.923 ± 0.004 1.260 ± 0.001 ns/op 0.73x (p = 0.000*)
>> getAppArrayModifiersFinal 30 0.922 ± 0.000 1.260 ± 0.001 ns/op 0.73x (p = 0.000*)
>>
>> No it doesn't really help. There's still an extra load.
>
> OK, if the extra load turns out to be a problem in the future, we could look into why the compilers are generating the load when the Class is known/constant. If the old intrinsic was able to pull the constant out of the Klass, then surely we can do the same and pull the value from the Class field.
Does `static final` help here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22652#discussion_r1944083490
More information about the core-libs-dev
mailing list