[Bug libstdc++/50661] std::equal should use more efficient version for arrays of pointers

vincenzo.innocente at cern dot ch gcc-bugzilla@gcc.gnu.org
Sat Oct 8 13:49:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50661

--- Comment #14 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-10-08 13:48:22 UTC ---
Thanks for adding me in the loop.
I wonder if we can reuse
-funsafe-loop-optimizations 
to force loop vectorization.
I know that INTEL has introduced a specific pragma to force vectorization for
instance.
Maybe gcc can do the same…

in any case recoding in
if ((array1[i] != array2[i])
        | (array1[i+1] != array2[i+1])
        | (array1[i+2] != array2[i+2])
        | (array1[i+3] != array2[i+3]))

is Vector and size specific (SSE, AVX, future-1024) char,float,double
so very suboptimal...



More information about the Gcc-bugs mailing list