3 ms·
> This means is a magnitude faster than the previous one! Is this right? It's a quadratic not an order of magnitude difference isn't it? And can you be an orde
by chrisseaton 7y ago
> This means is a magnitude faster than the previous one!
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?
- stellalo 7y ago> Is this right? It's not right, indeed
- fancyfredbot 7y agoIt's not wrong! For some value of N it is an order of magnitude faster. It's just a bit misleading.
- eesmith 7y agoFor another value of N it's three orders of magnitude faster. 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.
- asdginioubnou 7y agoIt's definitely wrong. A lot of people use "order of magnitude" to just mean "a lot". 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.