3 ms·
O(1) is not constant time. It's bounded from above by a constant times 1 for sufficiently large values of N time. In particular, sin(N) is O(1) despite never
by cperciva 9y ago
O(1) is not constant time. It's bounded from above by a constant times 1 for sufficiently large values of N time.
In particular, sin(N) is O(1) despite never taking the same value twice.
- friendlydude12 9y agoThanks, I went to college too and was fully aware of the formal definition of O() notation. That doesn’t change the fact that colloquially it’s far more common to use the phrase “constant time” when referring to time complexity rather than timing attack resistance.
- pinko 9y agoColin did a little more than "go to college".
- friendlydude12 9y agoOh really? Please explain to me how that is relevant to the point being made in this thread. https://en.wikipedia.org/wiki/Time_complexity#Constant_time https://en.wikipedia.org/wiki/Time_complexity#Constant_time