Hacker News new | ask | show | jobs
by ndriscoll 375 days ago
> figuring out the actual complexity is neither relevant nor an economic use of time

The fix was replacing a nested loop with a map. Figuring out that this goes from O(n^2) to O(n) (modulo details like bucket count) is immediate if you know what the words mean and understand enough to identify the problem and make the fix in the first place.

1 comments

Yes that's the algorithmic complexity of the function they patched.