On Thu, 10 Apr 2025 15:52:38 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
> > Baseline: > > ``` > > Benchmark (offsetCount) (segmentSize) Mode > > Cnt Score Error Units > > FFMVarHandleInlineTest.t0_reference 2048 1024 thrpt > > 25 1552613.262 ? 14295.035 ops/s > > FFMVarHandleInlineTest.t1_level8 2048 1024 thrpt > > 25 1558465.228 ? 8458.874 ops/s > > FFMVarHandleInlineTest.t2_level9 2048 1024 thrpt > > 25 1542009.100 ? 10240.173 ops/s > > FFMVarHandleInlineTest.t3_level10 2048 1024 thrpt > > 25 1553407.503 ? 10834.133 ops/s > > FFMVarHandleInlineTest.t4_level11 2048 1024 thrpt > > 25 87666.558 ? 765.848 ops/s. <-- We hit the inline limit here > > ``` > > > > > > > > > > > > > > > > > > > > > > > > Patch without `Object` changes: > > ``` > > Benchmark (offsetCount) (segmentSize) Mode Cnt > > Score Error Units > > FFMVarHandleInlineTest.t_level11 2048 1024 thrpt 6 > > 149221.636 ± 1928.957 ops/s > > FFMVarHandleInlineTest.t_level12 2048 1024 thrpt 6 > > 74478.268 ± 1093.429 ops/s > > FFMVarHandleInlineTest.t_level13 2048 1024 thrpt 6 > > 74490.972 ± 623.857 ops/s > > FFMVarHandleInlineTest.t_level14 2048 1024 thrpt 6 > > 69637.549 ± 2497.253 ops/s > > FFMVarHandleInlineTest.t_level15 2048 1024 thrpt 6 > > 3495.106 ± 87.465 ops/s > > ``` > > > > > > > > > > > > > > > > > > > > > > > > Patch with `Object` changes: > > ``` > > Benchmark (offsetCount) (segmentSize) Mode Cnt > > Score Error Units > > FFMVarHandleInlineTest.t_level11 2048 1024 thrpt 6 > > 1545991.924 ± 21206.450 ops/s > > FFMVarHandleInlineTest.t_level12 2048 1024 thrpt 6 > > 1542234.193 ± 18002.511 ops/s > > FFMVarHandleInlineTest.t_level13 2048 1024 thrpt 6 > > 1542601.822 ± 15041.864 ops/s > > FFMVarHandleInlineTest.t_level14 2048 1024 thrpt 6 > > 179053.325 ± 2496.002 ops/s > > FFMVarHandleInlineTest.t_level15 2048 1024 thrpt 6 > > 3433.861 ± 165.847 ops/s > > ``` > > am I reading this the right way around? Baseline is faster than the patched > version? Ah ok - you gain 3-4 more levels. Again... I'm really not sure about how reliable this all is. I'd suggest for somebody like @iwanowww to validate this -- while JMH gives some better results here, I'm skeptical that real world usage is going to see any difference here, as the benchmarking conditions seem a little too on the artificial side. ------------- PR Comment: https://git.openjdk.org/jdk/pull/23460#issuecomment-2794338281