On Wed, 5 Feb 2025 01:10:39 GMT, Dean Long <dl...@openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix copyright and param name > > test/micro/org/openjdk/bench/java/lang/reflect/Clazz.java line 73: > >> 71: public int getAppArrayModifiers() { >> 72: return clazzArray.getClass().getModifiers(); >> 73: } > > I'm guessing this is the benchmark that shows an extra load. How about > adding a benchmark that makes the Clazz[] final or @Stable, and see if that > makes the extra load go away? 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22652#discussion_r1943569183