> While I find them in a slightly different order, I'm surprised by the
> 4x speedup.  I wonder if there's a better way to post comparisons that
> would negate machine differences and focus on algorithmic distinctions
> without posting code?


Change the upper limit. In addition to one million, try one thousand,
or even one billion. You could probably get a rough estimation of
whether an algorithm is O(n) or O(n^2) that way.

My impression is that everyone should be able to easily get an O(n)
solution. But there should be tricks to trim that down... whether it
will be a simple constant multiplier, or actually getting it down to,
say, O(lg n), I don't know.