2 ms·
You need restrict for a loop involving char* or equivalent because it can alias any type in C. Without it, the compiler has to preserve memory accesses exactly,
by astrange 3y ago
You need restrict for a loop involving char* or equivalent because it can alias any type in C. Without it, the compiler has to preserve memory accesses exactly, and then it's hardly able to do any optimizations. If you're writing all the memory accesses out perfectly optimally already, then you don't need the compiler for much.