3 ms·
Note that certain things can cause your code to be un-jitted. If you run into a NPE, for example, what actually happens is the compiled code segfaults. Adding n
by winrid 4y ago
Note that certain things can cause your code to be un-jitted. If you run into a NPE, for example, what actually happens is the compiled code segfaults. Adding null checks everywhere would be slow, so instead the JVM lets it blow up. When the jitted code segfaults that bytecode goes back into interpreted mode and has to be compiled again w/ updated heuristics.
Still, covering cases like this is easier than writing C. :)
- winrid 4y agoAlso what's missing in this article is a relative comparison. What if the testing machines have some kind of cron or process that's messing up the microbenchmark? I didn't see that comparison here.
- dan-robertson 4y agoDid you miss the bits about krun or running many iterations? Though that’s mostly from the older paper rather than the subject of this article.
- winrid 4y agoI guess I missed that.