[foreign-memaccess] RFR: Add JMH test for loop over sliced segment
Jorn Vernee
jvernee at openjdk.java.net
Wed Apr 8 18:22:15 UTC 2020
On Wed, 8 Apr 2020 17:44:54 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> 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.
test/micro/org/openjdk/bench/jdk/incubator/foreign/LoopOverNonConstant.java line 140:
> 139: @Benchmark
> 140: public int segment_loop_slice() {
> 141: int sum = 0;
Looks like the method is accidentally defined twice.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/107
More information about the panama-dev
mailing list