RFR: 8287788: reuse intermediate segments allocated during FFM stub invocations [v6]

Matthias Ernst duke at openjdk.org
Mon Jan 20 18:43:55 UTC 2025


On Mon, 20 Jan 2025 18:33:55 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> test/micro/org/openjdk/bench/java/lang/foreign/CallOverheadByValue.java line 54:
>> 
>>> 52: @State(org.openjdk.jmh.annotations.Scope.Thread)
>>> 53: @OutputTimeUnit(TimeUnit.NANOSECONDS)
>>> 54: @Fork(value = 1, jvmArgs = {"--enable-native-access=ALL-UNNAMED", "-Djava.library.path=micro/native"})
>> 
>> Please set the fork value to at least 3, so we can spot bimodal results.
>
> Actually, on my machine I'm already seeing some bimodal results, where sometimes the `byValue` case takes twice as long.

Done. I've been seeing stable results.

Benchmark                    Mode  Cnt  Score   Error  Units
CallOverheadByValue.byPtr    avgt   30  3.344 ? 0.074  ns/op
CallOverheadByValue.byValue  avgt   30  5.496 ? 0.054  ns/op

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23142#discussion_r1922759333


More information about the core-libs-dev mailing list