3 ms·
> all decent C compilers can easily and robustly generate such code From what I've seen auto-vectorization is anything but robust, often you need non-portable
by ramchip 12y ago
> all decent C compilers can easily and robustly generate such code
From what I've seen auto-vectorization is anything but robust, often you need non-portable annotations to get anything decent. See e.g.: http://locklessinc.com/articles/vectorize/ http://locklessinc.com/articles/vectorize/ where there's an interesting case where using "if" instead of a ternary operator is enough to prevent optimization.