3 ms·
It seems to me though, that the Java numbers aren't representative. As far as I know, JVM benchmarks should allow HotSpot etc to optimise the functions by call
by th0br0 12y ago
It seems to me though, that the Java numbers aren't representative. As far as I know, JVM benchmarks should allow HotSpot etc to optimise the functions by calling them ~1k times before the actual benchmark happens. That doesn't seem to be the case in the code.
- logicchains 12y agoThe same function is being called over and over millions of times, so hopefully that should give HotSpot a chance to kick in. I didn't want to add artificial warm up as I don't think that's representative of real code.
- igouy 12y agoCheck times with JMH http://openjdk.java.net/projects/code-tools/jmh/ http://openjdk.java.net/projects/code-tools/jmh/ Also -XX:-PrintCompilation -XX:-PrintGC https://wikis.oracle.com/display/HotSpotInternals/MicroBenchmarks https://wikis.oracle.com/display/HotSpotInternals/MicroBench...