3 ms·
While it is true that asymptotically 5 * O(m) equals O(m), in practice 5 * O(m) is still 5x slower. EDIT (reply threshold): "That's not how big-O notation wor
by optimiz3 13y ago
While it is true that asymptotically 5 * O(m) equals O(m), in practice 5 * O(m) is still 5x slower.
EDIT (reply threshold):
"That's not how big-O notation works. It only applies to asymptotic behavior. It makes sense to say that iterating over the whole list 5 times is slower than just doing it once, but it's O(m) either way."
Now you're just being pedantic.
- sp332 13y agoThat's not how big-O notation works. It only applies to asymptotic behavior. It makes sense to say that iterating over the whole list 5 times is slower than just doing it once, but it's O(m) either way.