6 ms·
You 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
by Vendan 10y ago
You 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 :)