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]

Re: Sun compares their compiler tools to GNU tools


In article <199811071823.KAA07463@yamato.synopsys.com>,
Joe Buck <jbuck@synopsys.com> writes:
>> KAI C++ have better performance than Sun CC (near 30%) and
>> Sun CC near 30% better gcc,

> Such figures are meaningless.  Better performance on what?

> There are cases where KAI C++ will have about 5x the performance of
> either Sun CC or g++, and other cases where the performance is
> exactly the same (KAI does C++ -> C so it is limited by the performance
> of the C compiler you choose, which might be gcc or Sun C).

KAI C++ seems to do better than egcs on the Stepanov Abstraction benchmark.
This benchmark implements a simple algorithm in various abstraction
levels (e.g. hand coded, with STL, without, with classes and members etc.)
Then it tests how much slower the abstracted versions run compared to the
handcoded version. 

The problem seems to be that inline functions generate worse code than
hand expanded macros: KAI C++ expands the inline functions before gcc
sees it and gets better code.

The Stepanov benchmark is available from ftp.kai.com.


-Andi


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