[foreign-memaccess+abi] RFR: Benchmark Java to/from C string conversions

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Aug 23 15:19:13 UTC 2023


This PR adds two benchmark to test performance of Java <-> C string conversions.
The benchmark is not 100% fair, given that JNI has also to transition from Java to native code, but the trend in the benchmark is nevertheless interesting, showing that JNI string conversion scales very poorly with growing string size.

Thanks to recent optimizations, FFM string conversion is now competitive even for smaller string sizes.

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

Commit messages:
 - Initial push

Changes: https://git.openjdk.org/panama-foreign/pull/874/files
 Webrev: https://webrevs.openjdk.org/?repo=panama-foreign&pr=874&range=00
  Stats: 252 lines in 4 files changed: 252 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/panama-foreign/pull/874.diff
  Fetch: git fetch https://git.openjdk.org/panama-foreign.git pull/874/head:pull/874

PR: https://git.openjdk.org/panama-foreign/pull/874


More information about the panama-dev mailing list