logoalt Hacker News

cogman10today at 2:15 PM1 replyview on HN

It's a good rule of thumb that can be quite useful without additional analysis. It's not always the right way to do performance tuning, but I can't count the number of times I've changed an O(n^3) to an O(n) and seen massive performance gains as a result.


Replies

marginalia_nutoday at 2:27 PM

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.

show 2 replies