4 ms·
Are you the author of the linked post? If so I have a couple of questions: - Why not throw out the best and worst cases for each and then find the mean of run
by imauld 10y ago
Are you the author of the linked post? If so I have a couple of questions:
- Why not throw out the best and worst cases for each and then find the mean of run times? Seems like a more "fair" way to compare them.
- Did you compare the assembly generated by the compiler to the assembly you wrote?
- Vendan 10y agoYou should always be comparing best case for this kind of thing. Slower cases are most likely "your thread got switched out by the OS to let something else run", and that's not really a fair test.
- qznc 10y agoIf you want to guard against context switches by the OS, don't use stuff that "most likely" works. Measure with perf and let it count the context switches.
- zamalek 10y agoWhich is why you use 90th percentile.
- to3m 10y agoWhat's wrong with using the best result? If you're concerned the code could run faster than possible: don't be :)
- panic 10y agoYour first question was asked and answered here: https://news.ycombinator.com/item?id=13060404 https://news.ycombinator.com/item?id=13060404
- emeryberger 10y agoA note: every compiler writer should read this paper. https://emeryberger.com/research/stabilizer/ https://emeryberger.com/research/stabilizer/