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.
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.