2 ms·
It depends on how much information you give to the compiler. A modern GCC can do magic like AVX vectorization and OpenMP parallelization if you give your functi
by fxtentacle 6y ago
It depends on how much information you give to the compiler. A modern GCC can do magic like AVX vectorization and OpenMP parallelization if you give your function the right restrict and pragma annotations.
- gnufx 6y agoSomething like #pragma simd may actually be worse than letting GCC do its thing. It may not use FMA, just AVX, for instance. You may also want (a subset of) -ffast-math for NEON, reductions, etc., if your code is OK with it.