[Bug c/125571] compiling with gcc 380 times slower than clang (19 minutes vs 3 seconds)
hubert.garavel at inria dot fr
gcc-bugzilla@gcc.gnu.org
Thu Jun 4 17:00:15 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125571
--- Comment #17 from Hubert Garavel <hubert.garavel at inria dot fr> ---
The code would be difficult to optimize upstream: given a set of expressions
(closed terms), which can be of arbitrary types (including lists, trees, etc.)
and contain arbitrary functions (possibly given as C code fragments) that might
raise exceptions, one wants to decide whether 2 expressions are equal or not.
The goal is not to optimize upstream to ease the task of the C compiler,
but to use the C compiler as a means to decide equality in order to
optimize the upstream program.
By the way, on the original example:
clang -O1 takes 21 seconds
clang -O2 takes 30 seconds
clang -O3 takes 30 seconds
More information about the Gcc-bugs
mailing list