[foreign-memaccess] RFR: Add JMH test for loop over sliced segment

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Apr 8 17:51:21 UTC 2020


This simple patch adds a simple benchmark that does a loop on a segment slice. I found this test useful when
investigating escape analysis issues of derived segments, so I'm adding it here. With the current implementation
(MemorySegmentImpl) the difference between the new `segment_loop` and `segment_loop_slice` are negligible, so this can
be used to spot regressions in that logic.

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

Commit messages:
 - Add JMH test for loop over sliced segment

Changes: https://git.openjdk.java.net/panama-foreign/pull/107/files
 Webrev: https://webrevs.openjdk.java.net/panama-foreign/107/webrev.00
  Stats: 20 lines in 1 file changed: 20 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/107.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/107/head:pull/107

PR: https://git.openjdk.java.net/panama-foreign/pull/107


More information about the panama-dev mailing list