4 ms·
0. Generously use black_box 1. a large sample size 2. a single thread 3. high-precision monotonic timestamps on an unloaded system 4. mean/std dev from more
by heyiforgotmypwd 7y ago
0. Generously use black_box
1. a large sample size
2. a single thread
3. high-precision monotonic timestamps on an unloaded system
4. mean/std dev from more than several runs
- malkia 7y agoOr frameworks helping you do so - like "benchmark" for C++ (though I wonder if there is a cross-language one - that does the same amount of "pre"-warming, same counters, etc.) Probably not... and too much to ask.
- Groxx 7y ago5. run them long enough to stabilize thermally so you don't have bursts of performance (potentially minutes), and/or use something like perflock to lock down your cpu speed: https://github.com/aclements/perflock https://github.com/aclements/perflock (general tactic, this is just the last tool I heard of) 6. for similar reasons, run them in a random order each time