logoalt Hacker News

ccapitalKtoday at 4:35 AM1 replyview on HN

Am I getting the math wrong here? Going from O(n) to O(log n) (with no change in constant factor) for a million items would be going from ~1000000c ops to ~20c ops, which would be a 50000x improvement?


Replies

DarkNova6today at 7:32 AM

Big O Notation omis constant factors that tend to be significantly larger for log-n algorithms.

I think he talked from personal experience.

show 1 reply