logoalt Hacker News

marginalia_nutoday at 2:27 PM2 repliesview on HN

Yeah it helps make awful code decent, and some algorithms are better than others, but in terms of high performance code, locality, vectorization, and branching often matter much more big O.


Replies

bluGilltoday at 4:21 PM

That depends on what end ends. For a small N, very bad algorithms can still be plenty fast. Sometimes it can even be faster. Some of your lower O algorithms can have very terrible constant factors, which means they're terrible when N is small, but as N gets large.

Big and small N different for different algorithms and hardware both.

cogman10today at 2:50 PM

Totally agree, but I'm in Java land and cursed to have about the worst case scenario for those things :D

show 1 reply