Compile speed

Ben Elliston bje@cygnus.com
Sun Sep 6 18:04:00 GMT 1998


> |   > it took too long ;) So for development purposes, compilers should be
> |   > as fast as possible.

> | Then turn off the optimizer :-) :-)

> g++ still SLOW without optimizer - when compared to gcc :(
> I always compile without -O, but for some reason C++ takes
> 10 times longer then equivalent C sources :/
> To be clear: I am not saying it is slower then any other
> compiler or version, but I am convinced that it could be
> greatly improved (perhaps needing a rewrite ;) of the compiler).

Perhaps you could do some investigation into where the bottlenecks are.
Using the -c, -E, and -S switches to control how much work the compiler
does, you can work out, relative to gcc, where g++ is spending all of its
time.

Of course, this might be hard, because you might need some complex C++ to
cause g++ to slow down, but you can't use the same test input for gcc,
being a C compiler.

Ben




More information about the Gcc mailing list