News for hackers. Stuff that matters.
Re:Estimating the chances of something that hasn’t happened yet by zawerf on Thursday November 15, 2018 @05:44PM (#18464185)
Is this a good method to use while trying out a lot of ideas? Usually when I am optimizing code, most of the ideas don't work out and performance remains roughly the same (or so I think - I don't really know and want a better workflow here).

But if you do this test repeatedly, even if the code had identical performance, you'll get a false positive 5% of the time. And depending on the spread of the timings you might not get a clear XXXYYY win even when it is indeed a minor improvement.

Re:Estimating the chances of something that hasn’t happened yet by eloff on Thursday November 15, 2018 @07:36PM (#18465042)
sqlite famously squeezed out a ~40% performance improvement (I think from v3 to v4?) by just combining tons of micro-optimizations of this kind where it wasn't obvious if each change even made an improvement. They measured the performance with cachegrind in order to identify very small improvements that get lost in the normal measurement noise.
Re:Estimating the chances of something that hasn’t happened yet by thomasahle on Friday November 16, 2018 @04:49AM (#18467679)
Also check fishcooking: http://tests.stockfishchess.org/tests which is how Stockfish became the indisputably strongest chess engine: Everyone can commit patches which are then tested in thousands of games, and if they make Stockfish stronger, they are accepted.
Re:Estimating the chances of something that hasn’t happened yet by rytill on Thursday November 15, 2018 @10:17PM (#18466064)
That’s a really awesome idea. Also, maybe a few of the performance boosts in the final combination are mutualistic, but if measured independently would not make a difference.
Re:Estimating the chances of something that hasn’t happened yet by zawerf on Thursday November 15, 2018 @07:42PM (#18465090)
I would love to read more about this. Do you have a link?
Re:Estimating the chances of something that hasn’t happened yet by SQLite on Thursday November 15, 2018 @07:46PM (#18465122)
Re:Estimating the chances of something that hasn’t happened yet by hinkley on Thursday November 15, 2018 @07:47PM (#18465124)
Statistics is a tricky beast. If 3 runs gives you a 95% chance that your change is an improvement, and you use this process on ten different improvements, there's a 40% chance that at least one of them is bogus.
Re:Estimating the chances of something that hasn’t happened yet by hinkley on Friday November 16, 2018 @02:59PM (#18471517)
Would love to see a refutation from a downvoter.
Re:Estimating the chances of something that hasn’t happened yet by agonmon on Sunday November 18, 2018 @04:45PM (#18482682)
I believe you have it right. Odds that all changes are improvements in 10 changes is: (.95)^10 Odds that at least one change is not improvement is: 1-(.95)^10 = 0.40

One could probably make an argument that not all trials are independent, but not sure what else down-voters saw.

Re:Estimating the chances of something that hasn’t happened yet by ma2rten on Thursday November 15, 2018 @06:17PM (#18464412)
It is not a good method to use in that case.