[Bug middle-end/115832] Very slow compilation with `-fsanitize=undefined -O2` and std::sort
faisal.irl2004 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 9 05:19:15 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115832
--- Comment #6 from Mohammed Faisal <faisal.irl2004 at gmail dot com> ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Mohammed Faisal from comment #2)
> > I have also tested this with gcc 13.2.1 on a different machine and found a
> > similar slowdown.
> > Testing this with clang 14.0.6 gives only about a 2x slowdown as opposed to
> > the 13.5x slowdown with gcc.
>
> What is the relative difference in compiler speed between clang and GCC
> (rather than between -O0 and -O2 -fsanitize=undefine)?
Without std::sort
time clang++ -stdlib=libstdc++ A.cpp -D_GLIBCXX_DEBUG -fsanitize=undefined -O2
real 0m0.334s
user 0m0.275s
sys 0m0.058s
With std::sort
time clang++ -stdlib=libstdc++ A.cpp -D_GLIBCXX_DEBUG -fsanitize=undefined -O2
real 0m0.643s
user 0m0.584s
sys 0m0.059s
More information about the Gcc-bugs
mailing list