This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Speed discussion ...
- From: Oscar Fuentes <ofv at wanadoo dot es>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 18 Mar 2003 22:03:21 +0100
- Subject: Re: Speed discussion ...
- Cancel-lock: sha1:DCXM/G0hHjGLRh6Lqh8zIA4de0Q=
- References: <3E770EC3.2030405@comsys.se>
Lars Segerlund <lars dot segerlund at comsys dot se> writes:
> Hi , I have been asking around and it seem's that gcc is about 15
> times slower than borland ( I have asked three people with real
> projects on linux-gcc/win-bcc and comparable hardware ), and no
> advantage when it comes to code quality.
For my projects, code generated by g++ is ~15% faster than Borland. On
some cases it is 50% faster, mostly when lots of templates with inline
methods are involved. Borland inlines just the simplest code and,
IIRC, it is not as good as g++ doing constant folding. Then, some toy
cases shows Borland 100% faster, but those are ones that spends almost
all the time on the C runtime, so the compiler is not necessarily
producing better code. The cases where g++ is faster are real
projects, though.
> I haven't got anything consistent but it seem's from 'word of
> mouth' that gcc is about 10 times slower than most other compilers.
g++ is ~6 times slower than Borland+PCH here, using debug mode (I
don't care much about compile times on release mode). Your '10'
seems quite credible. The differences depends on the kind of C++
source code.
For the same projects, Intel v7 is ~4 times faster than g++ and
produces code that runs from 5% to 20% faster than g++ 3.2.2 (MinGW)
[snip]
--
Oscar