Integer vs IntBox benchmark

Tobias Hartmann tobias.hartmann at oracle.com
Wed Jun 27 07:53:20 UTC 2018


Hi Remi,

thanks for reporting these results!

You've probably seen that Serguey pushed a whole bunch of JMH tests recently:
http://mail.openjdk.java.net/pipermail/valhalla-dev/2018-June/004380.html
Just in case you are interested in running / looking at some of these.

Thanks,
Tobias

On 27.06.2018 00:46, Remi Forax wrote:
> I've just written a small perf benchmark [1] that compare int, Integer and IntBox (a value type that stores an int) and results are very good. 
> 
> On my laptop:
> Benchmark                    Mode  Cnt  Score    Error  Units
> IntBoxBenchMark.sum_IntBox   avgt   15  0.029 ±  0.001  ms/op
> IntBoxBenchMark.sum_Integer  avgt   15  0.523 ±  0.011  ms/op
> IntBoxBenchMark.sum_int      avgt   15  0.029 ±  0.001  ms/op
> 
> 
> On travisCI (amazon ec2 i think):
> Benchmark                    Mode  Cnt  Score    Error  Units
> IntBoxBenchMark.sum_IntBox   avgt   15  0.035 ±  0.001  ms/op
> IntBoxBenchMark.sum_Integer  avgt   15  0.724 ±  0.039  ms/op
> IntBoxBenchMark.sum_int      avgt   15  0.035 ±  0.001  ms/op
> 
> Rémi
> 
> [1] https://github.com/forax/valuetype-lworld/blob/master/src/test/java/fr.umlv.valuetype/fr/umlv/valuetype/perf/IntBoxBenchMark.java
> 



More information about the valhalla-dev mailing list