On Mon, 10 Jul 2023 08:17:59 GMT, Hamlin Li <m...@openjdk.org> wrote:
>> @Hamlin-Li >> The PR is fully correct. >> Don't forget, every Java instance method has a specific argument which >> called "this". That is why @State annotation is working. > > @kuksenko @swati-sha Thanks for explanation. I can understand what you said. > But I'm still not quite sure, as I remember jmh does some code manipulation > or instrumentation at source code (or bytecode level?), so the jmh test code > you write or see might not be the exact code to be executed at runtime. > It's better to be reviewed further by some one more familiar with jmh, or > could you add some data comparing the performance difference, so we can tell > it easily? > @Hamlin-Li I am one of JMH's authors. I know how it works. There is no need > for tests. @kuksenko Thanks for the confirmation. Then the benchmark modification looks good to me. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14746#issuecomment-1630252431