RFR: 7903367: JMH: Add JMHSample_39_MemoryAccess [v2]

Andriy Plokhotnyuk duke at openjdk.org
Wed Oct 19 15:44:27 UTC 2022


On Wed, 19 Oct 2022 14:42:48 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> My machine, `N = 20_000_000`:
>> 
>> 
>> Benchmark                          Mode  Cnt    Score    Error  Units
>> MemoryAccess.sumArray              avgt    5    7.296 ±  0.276  ms/op
>> MemoryAccess.sumArrayList          avgt    5   45.077 ±  1.787  ms/op
>> MemoryAccess.sumArrayListShuffled  avgt    5  544.628 ± 64.948  ms/op
>
> Yes, @mmirwaldt, do that ^ ;)

The next level would be a multi-thread benchmark to show mutual impact of different threads and limitation of scalability due to hitting of the memory bandwidth limits for L1, L2, LLC, and RAM when the total throughput stops increasing after some small number of threads.

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

PR: https://git.openjdk.org/jmh/pull/85


More information about the jmh-dev mailing list