On Mon, 31 Mar 2025 16:03:57 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> Here are the results of the new `MethodHandle` benchmarks:
> 
> ```
> Benchmark                               Mode  Cnt  Score   Error  Units
> StableMethodHandleBenchmark.atomic      avgt   10  3.676 ? 0.206  ns/op
> StableMethodHandleBenchmark.dcl         avgt   10  3.766 ? 0.181  ns/op
> StableMethodHandleBenchmark.finalMh     avgt   10  0.693 ? 0.015  ns/op
> StableMethodHandleBenchmark.map         avgt   10  7.648 ? 0.308  ns/op
> StableMethodHandleBenchmark.nonFinalMh  avgt   10  3.381 ? 0.485  ns/op
> StableMethodHandleBenchmark.stableMap   avgt   10  0.713 ? 0.016  ns/op
> StableMethodHandleBenchmark.stableMh    avgt   10  0.700 ? 0.030  ns/op
> ```

Thanks - I think this shows very clearly what this API is all about ;-) E.g. 
fast access is one part of the equation, but constant-folding of the accessed 
result is another very important property. When combined, they allow the kind 
of performance shown in this benchmark.

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

PR Comment: https://git.openjdk.org/jdk/pull/23972#issuecomment-2768892425

Reply via email to