Performance improvement to unchecked segment ofNativeRestricted

Radosław Smogura mail at smogura.eu
Tue Jan 5 22:32:06 UTC 2021


Hi all,

I hope you have a good day.

Here I would like to present some changes to increase performance of ofNativeRestricted - my benchmarks - where I tried to simulate access from code - outpaced the access to Java array (as intended). As it looks like that pull request flow has changed, I have to sign-up OCA (and if this change is fine I would be happy to do this).

Below please find benchmark results and link to "pending PR" / branch

The results outpaced the Java array access.

Benchmark                           Mode  Cnt         Score          Error  Units
AccessBenchmark.foreignAddress     thrpt    4  86860188.499 ± 13454393.406  ops/s
AccessBenchmark.foreignAddressRaw  thrpt    4  96150181.668 ±  7025145.700  ops/s
AccessBenchmark.target             thrpt    4  93673099.539 ± 23272596.145  ops/s```

versus tests on original repo

Benchmark                           Mode  Cnt         Score         Error  Units
AccessBenchmark.foreignAddress     thrpt    4  81907199.092 ± 2663269.652  ops/s
AccessBenchmark.foreignAddressRaw  thrpt    4  83629168.611 ± 1025857.535  ops/s
AccessBenchmark.target             thrpt    4  94023553.582 ± 6128411.421  ops/s

https://github.com/openjdk/panama-foreign/pull/431
[https://avatars2.githubusercontent.com/u/41768318?s=400&v=4]<https://github.com/openjdk/panama-foreign/pull/431>
[WIP] Performance improvement to unchecked segment ofNativeRestricted by rsmogura · Pull Request #431 · openjdk/panama-foreign<https://github.com/openjdk/panama-foreign/pull/431>
Here's a proposition to tune the access to global scope. This changes, could help to outpace the access to Java arrays using [] operator. The results outpaced the Java array access. Benchmark ...
github.com

Kind regards,
Rado


More information about the panama-dev mailing list