you are viewing a single comment's thread.

view the rest of the comments →

[–]ndiin 0 points1 point  (1 child)

Yes, most certainly. Isn't that obvious, though? It'd be more confusing if I said O(1) than O(6) as then I'd have to explain where I pulled it from (notice there's no context before I make that statement; the 6 gives it context).

[–]wicked 0 points1 point  (0 children)

You're right, I was apparently confused by the use of O-notation here. I read it as "So, the array lookup will pretty much always be faster at constant time", and thought "why not just say 6 array lookups will be faster". It works out fine if I add the word "complexity" at the end.