Comment by gblargg
2 months ago
My compiler knows SIMD. However, knowing the limitations of SIMD might help avoid a calculation that can't be optimized to use it.
2 months ago
My compiler knows SIMD. However, knowing the limitations of SIMD might help avoid a calculation that can't be optimized to use it.
Your compiler can vectorise trivial things, once your code gets complicated it will no longer vectorise.
Once the code is complicated you don't need to make it more complicated lest it becomes unmaintainable.
It really doesn’t take much complexity at all for autovectorisation to fail.