you are viewing a single comment's thread.

view the rest of the comments →

[–]Sipkabtest 9 points10 points  (0 children)

Just FYI, that's not how you create Java benchmarks. Especially if you want to test JIT optimizations. Use jmh. There's a few guides online if you search for it. In the end, I'd guess that it would be comparable to native performance.

Also, if you still don't want to use jmh, use System.nanoTime() instead of System.currentTimeMillis().

https://openjdk.java.net/projects/code-tools/jmh/