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

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Aug 28 12:13:37 UTC 2023


On Wed, 23 Aug 2023 15:11:39 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: e00e7d67
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/panama-foreign/commit/e00e7d671c62feef1656d03f4088dae2365ddbb9
Stats:     252 lines in 4 files changed: 252 ins; 0 del; 0 mod

Benchmark Java to/from C string conversions

Reviewed-by: pminborg

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

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


More information about the panama-dev mailing list