<div dir="ltr">(might be worth mentioning on llvm-dev - could get lost on commits)<br><br>Maybe even writing up as documentation on the website somewhere - runtime analysis has always been a real pain for me to get reliable numbers, so I'm really glad for any/all tips I can find when I end up dealing with it.<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 19, 2016 at 7:39 PM Rafael Espíndola via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After much pain I decided that instead of just running tests many<br class="gmail_msg">
times I should put some effort in figuring out why perf numbers were<br class="gmail_msg">
so hard to reproduce on my machine.<br class="gmail_msg">
<br class="gmail_msg">
I was already disabling address space randomization and setting the<br class="gmail_msg">
scaling_governor to performance. Other things I found<br class="gmail_msg">
<br class="gmail_msg">
* Use <a href="https://github.com/lpechacek/cpuset" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/lpechacek/cpuset</a> to reserve a cpu for just<br class="gmail_msg">
the program you are benchmarking.<br class="gmail_msg">
* Disable the SMP pair (echo 0 > /sys/devices/system/cpu/cpuX/online)<br class="gmail_msg">
of the cpu you will use for the benchmark.<br class="gmail_msg">
* disable turbo mode (echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo).<br class="gmail_msg">
<br class="gmail_msg">
The results are pretty awesome:<br class="gmail_msg">
<br class="gmail_msg">
3.012355647 seconds time elapsed         ( +-  0.01% )<br class="gmail_msg">
<br class="gmail_msg">
:-)<br class="gmail_msg">
<br class="gmail_msg">
Cheers,<br class="gmail_msg">
Rafael<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div></div>