Re:C performance mystery: delete unused string constant
by api on Wednesday June 24, 2020 @10:09PM
(#23636142)
Why isn't it the default everywhere?
[ Parent
| on HN ]
Re:C performance mystery: delete unused string constant
by jeffbee on Wednesday June 24, 2020 @10:18PM
(#23636203)
As 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.
Re:C performance mystery: delete unused string constant
by xelxebar on Wednesday June 24, 2020 @11:05PM
(#23636475)
Neat. I was unaware of this manual. For the lazy but curious:
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/article...