This can be shown with benchmarks from CODETOOLS-7902579.
Benchmark (size) Mode Cnt Score Error Units
GraphInstanceBench.onlyCollect 1000 avgt 5 495675.674 ± 36887.568 ns/op
GraphInstanceBench.onlyCollect:- gc.alloc.rate 1000 avgt 5 1669.318 ± 123.472 MB/sec
GraphInstanceBench.onlyCollect:- gc.alloc.rate.norm 1000 avgt 5 1301256.217 ± 0.042 B/op
Parsing Integer[1000] array takes 0.5 us (495 ns/elem) and 1.3M (1.3K/elem) heap space. This is very inefficient and should be improved.
Benchmark (size) Mode Cnt Score Error Units
GraphInstanceBench.onlyCollect 1000 avgt 5 495675.674 ± 36887.568 ns/op
GraphInstanceBench.onlyCollect:- gc.alloc.rate 1000 avgt 5 1669.318 ± 123.472 MB/sec
GraphInstanceBench.onlyCollect:- gc.alloc.rate.norm 1000 avgt 5 1301256.217 ± 0.042 B/op
Parsing Integer[1000] array takes 0.5 us (495 ns/elem) and 1.3M (1.3K/elem) heap space. This is very inefficient and should be improved.