boxing + unboxing a VT is not a no-op ? (original) (raw)
forax at univ-mlv.fr forax at univ-mlv.fr
Tue Jul 17 15:11:27 UTC 2018
- Previous message (by thread): boxing + unboxing a VT is not a no-op ?
- Next message (by thread): boxing + unboxing a VT is not a no-op ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The jar is test-fr.umlv.valuetype-1.0.jar, it has dependencies to JUnit 5 and JMH
Every jars are here: http://www-igm.univ-mlv.fr/~forax/tmp/valhalla/
you can run it like this: /usr/jdk/jdk-11-lworld/bin/java -XX:+EnableValhalla --module-path path_to_the_folder_that_contains_the_jars -m fr.umlv.valuetype/fr.umlv.valuetype.perf.ReifiedListBenchMark
regards, Rémi
----- 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 16:58:41 Objet: Re: boxing + unboxing a VT is not a no-op ?
Hi Remi,
okay, thanks for the details. Could you maybe upload the jmh benchmark .jar? I have problems to build the entire benchmark suite from scratch and I cannot reproduce the performance difference when extracting the benchmark methods and running them manually. Thanks, Tobias On 17.07.2018 16:14, forax at univ-mlv.fr wrote: when i run the benchmark,
Benchmark Mode Cnt Score Error Units ReifiedListBenchMark.arraylistintegerget avgt 9 0.055 ± 0.001 ms/op ReifiedListBenchMark.reifiedlistintboxget avgt 9 506.190 ± 7.978 ms/op ReifiedListBenchMark.valuelistintboxget avgt 9 0.027 ± 0.001 ms/op ReifiedListBenchMark.valuelistintboxinlinedreduce avgt 9 0.027 ± 0.001 ms/op ReifiedListBenchMark.valuelistintboxinnervalueinlinedreduce avgt 9 0.304 ± 0.004 ms/op if you compare valuelistintboxget and valuelistintboxinlinedreduce 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. valuelistintboxinnervalueinlinedreduce should be as fast as valuelistintboxinlinedreduce, because the only difference is value type to > object boxing.
- Previous message (by thread): boxing + unboxing a VT is not a no-op ?
- Next message (by thread): boxing + unboxing a VT is not a no-op ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]