boxing + unboxing a VT is not a no-op ?
forax at univ-mlv.fr
forax at univ-mlv.fr
Tue Jul 17 14:14:30 UTC 2018
----- Mail original -----
> De: "Tobias Hartmann" <tobias.hartmann at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "valhalla-dev" <valhalla-dev at openjdk.java.net>
> Envoyé: Mardi 17 Juillet 2018 14:31:08
> Objet: Re: boxing + unboxing a VT is not a no-op ?
> Hi Remi,
>
> I had a look at the C2 generated code for
> valuelist_intbox_innervalue_inlined_reduce and it is
> essentially the same highly optimized code that is generated for
> valuelist_intbox_inlined_reduce.
>
> I'm not able to measure a performance difference either. Were you able to
> reproduce this with the
> latest version of the repo? Maybe some of our recent patches fixed this problem
> as well.
when i run the benchmark,
Benchmark Mode Cnt Score Error Units
ReifiedListBenchMark.arraylist_integer_get avgt 9 0.055 ± 0.001 ms/op
ReifiedListBenchMark.reifiedlist_intbox_get avgt 9 506.190 ± 7.978 ms/op
ReifiedListBenchMark.valuelist_intbox_get avgt 9 0.027 ± 0.001 ms/op
ReifiedListBenchMark.valuelist_intbox_inlined_reduce avgt 9 0.027 ± 0.001 ms/op
ReifiedListBenchMark.valuelist_intbox_innervalue_inlined_reduce avgt 9 0.304 ± 0.004 ms/op
if you compare valuelist_intbox_get and valuelist_intbox_inlined_reduce you see that a value type that contains an int as as fast as an int, that's great but i'm more interested by the last two benchmarks.
valuelist_intbox_innervalue_inlined_reduce should be as fast as valuelist_intbox_inlined_reduce, because the only difference is value type to object boxing.
>
> Thanks,
> Tobias
Rémi
More information about the valhalla-dev
mailing list