Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I echo the earlier comments to use jmh for benchmarking. There's lots of subtle issues that jmh solves.

One thing I notice is that your sieve run doesn't return any values. Java can optimise out code that produces no effect in some circumstances.

EDIT: Although in that case, you'd expect to see it run insanely fast. Anyway, the point stands, there's lots of non obvious issues in benchmarking.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: