GCC does not optimize well enough with vectors on bitshift
Matt Godbolt
matt@godbolt.org
Mon Mar 10 15:53:50 GMT 2025
While this doesn't affect your example in this particular case: please
don't use `-march-native` on Compiler Explorer for these examples - this
will pick whatever architecture your individual query is served from which
may be any of the available AMD or Intel CPUs we run on. There ought to be
a pop-up warning you against doing this (I'm not sure why it didn't show
up).
Please use a specific architecture e.g. `-march=skylake-avx512` -
https://godbolt.org/z/GvTcqasqK
Thanks, Matt :)
On Mon, Mar 10, 2025 at 10:47 AM Qwert Nerdish via Gcc <gcc@gcc.gnu.org>
wrote:
> Correct link is https://godbolt.org/z/GfeTobMvs
>
> On Mon, Mar 10, 2025 at 4:45 PM Qwert Nerdish <kaelfandrew@gmail.com>
> wrote:
>
> > On this godbolt link at https://godbolt.org/z/GfeTobMvs, the two C
> source
> > codes behave identical.
> > Yet the second source code does not use vectors and is 30% slower when I
> > tested it.
> >
>
--
Matt
(he/him)
More information about the Gcc
mailing list