Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pretty sure that's not the issue, but I checked now to confirm. I posted my test code to Agner's blog a few minutes ago, but it hasn't appeared yet. I repasted to a Gist here: https://gist.github.com/nkurz/5e389a29cd1eabaae67924b28b40e7...

The main thing to notice is that on Skylake the "two macro two micro" is fastest and executes at 1 cycle per iteration, while on Haswell is it slower than than a couple options with less fusion. I don't think there is anything that surprising here, but it does point out some not very clearly documented differences between Haswell and Skylake.

BR_INST_RETIRED_NEAR_TAKEN is to show the number of loop iterations. Run time in cycles is shown by CPU_CLK_UNHALTED_CORE. The difference between INSTR_RETIRED_ANY and UOPS_RETIRED_ALL shows the effect of macro-fusion of CMP/JCC. The difference between UOPS_ISSUED_ANY and UOPS_EXECUTED_CORE shows the effect of micro-fusion of LOAD/ADD. UOPS_EXECUTED_CORE and UOPS_RETIRED_CORE are the same on both machines, showing that there is no branch misprediction occurring.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: