GCC is good, it knows many tricks, it contains a lot of pattern matching code and other code to allow such vectorizations, and that C code is almost transparent & standard (restrict is standard, and I think __builtin_assume_aligned isn't too much hard to #define away when not available. And something like --fast-math is available on most compilers (despite Walter doesn't like it)). So it's good to optimize legacy C code too.

I was really surprised that all vectorization approaches seem to be restricted to loops. I'd think that loop unrolling + arithmetic vectorization should achieve most of a
specialized loop vectorization.

http://forum.dlang.org/post/[email protected]
https://github.com/D-Programming-Language/phobos/blob/master/std/numeric.d#L2329

Reply via email to