Memory Segment efficient array handling

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Apr 1 13:50:40 UTC 2021


On 01/04/2021 14:44, Maurizio Cimadamore wrote:
> Again: this thread has nothing (or little) to do with performance and 
> everything to do with usability. Let's keep the performance/GC side 
> out of the equation, please. 

Just to look at GC side and give more hard evidence:

```
Benchmark                                              Mode Cnt     
Score     Error   Units
BulkOps.getIntArraySegments                            avgt   30 
7461.892 ?  79.961   ns/op
BulkOps.getIntArraySegments:?gc.alloc.rate             avgt 30    ? 
10??            MB/sec
BulkOps.getIntArraySegments:?gc.alloc.rate.norm        avgt 30     0.007 
?   0.001    B/op
BulkOps.getIntArraySegments:?gc.count                  avgt 30       ? 
0            counts
BulkOps.getIntArrayUnsafe                              avgt   30 
7391.234 ? 161.212   ns/op
BulkOps.getIntArrayUnsafe:?gc.alloc.rate               avgt 30    ? 
10??            MB/sec
BulkOps.getIntArrayUnsafe:?gc.alloc.rate.norm          avgt 30     0.007 
?   0.001    B/op
BulkOps.getIntArrayUnsafe:?gc.count                    avgt 30       ? 
0            counts
```

(I apologize for the ?? in the output, my console terminal seems to be 
at odds with the exponentials generated by JMH - but read that as zero).

As you can see there's no difference in GC load between the various 
benchmarks.

Maurizio



More information about the panama-dev mailing list