This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Speed discussion ...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]