2 ms·
You can use `-mprefer-vector-width=512` to use 512 bit vectors, or if you want a particular function to use 512, you could try the min-vector-width attribute:
by celrod 4y ago
You can use `-mprefer-vector-width=512` to use 512 bit vectors, or if you want a particular function to use 512, you could try the min-vector-width attribute:
https://clang.llvm.org/docs/AttributeReference.html#min-vector-width https://clang.llvm.org/docs/AttributeReference.html#min-vect...
In my experience, clang unrolls too much, so you end up spending all your time in the non-vectorized remainder.
Using smaller vectors cuts the size of the non-vectorized remainders in half, so smaller vectors often give better performance for that reason.
(Unrolling less could have the same effect while decreasing code size, but alas)