by chrisseaton · 6y ago · 0 comments
Is this right? It's a quadratic not an order of magnitude difference isn't it? And can you be an order of magnitude faster in an O notation expression anyway? Isn't an order of magnitude a coefficient? Don't we drop coefficients in O notation?
I always use the precise meaning. It might be better for me to say "factor of ten" rather than "order of magnitude" if other people don't always use the precise meaning.
In the example case where s[0] == s[1], it might be an order of magnitude slower, if there's much object initialization for the lookup table.
It's not right, indeed