News for hackers. Stuff that matters.
Re:Undefined behavior in C is a reading error by tom_mellior on Friday May 21, 2021 @04:22PM (#27239417)
Yes, with lots of extra ceremony around it. (More than is needed, since it doesn't seem to realize that it will always process exactly 16 loop iterations.)

Since you've posted a lot along the lines of "these optimizations don't even make a difference", you might want to see if Clang's safer-looking version is as fast as GCC's.

Re:Undefined behavior in C is a reading error by vyodaiken on Friday May 21, 2021 @04:57PM (#27239873)
It's not an interesting optimization. Micro-benchmarks are of limited utility. The extra complication is to protect the code from flying off and writing on random memory. Well worth it.