2 ms·
Not hate for loops, but if you replace them with, say, array operations, you've removed the need to prove your loops correct -- or removed a possible source of
by gnufx 5y ago
Not hate for loops, but if you replace them with, say, array operations, you've removed the need to prove your loops correct -- or removed a possible source of error from getting them wrong. I guess what's clearer is a matter of opinion.
Reconstructing what was meant at high level from arbitrary loops is surely intractable, but could only be a property of a compiler, not a language. Should a compiler like GCC necessarily recognize a matmul loop nest and replace it with a GEMM call? XL always does -- which can make investigating it's optimization annoying -- but then it doesn't actually recognize GEMM.