logoalt Hacker News

marginalia_nutoday at 2:00 PM2 repliesview on HN

Looking at big-O isn't very informative. We have plenty of statistical tools for telling whether there is an effect even with noisy data.


Replies

xliitoday at 2:09 PM

I ran 10k test locally on 2e5 and I'm seeing 4 orders of magnitude instability, but very high local stability (i.e. runs within specific second are very stable, showing almost no deviation, runs couple second later are the same, but results are within 1 OoM of the prior results (smaller batches, 500 tests).

I'm not saying that optimization isn't valid, what I'm saying is that Quicksort shouldn't be optimized over randomized per run data set.

show 1 reply
cogman10today at 2:15 PM

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.

show 1 reply