4 ms·
Why isn't it the default everywhere?
by api 6y ago
Why isn't it the default everywhere?
- jeffbee 6y agoAs I tried to indicate, the microbenchmark-guided unrolled loops look better than the simple `rep` instruction because the benchmarks aren't realistic. They don't suffer from mispredicted branches, they don't experience icache pressure. Basically the microarchitectural reality is absent in a small benchmark. There's also the fact that `rep` startup cost was higher in the past than it is now. I think it started to get really fast around Ivy Bridge. This is all discussed in Intel's optimization manual, by the way.
- xelxebar 6y agoNeat. I was unaware of this manual. For the lazy but curious: https://software.intel.com/content/www/us/en/develop/download/intel-64-and-ia-32-architectures-optimization-reference-manual.html https://software.intel.com/content/www/us/en/develop/downloa... And if you want ALL THE THINGS: https://software.intel.com/content/www/us/en/develop/articles/intel-sdm.html https://software.intel.com/content/www/us/en/develop/article...