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: Abnormally large executable with gcc 3.0


On Sat, May 26, 2001 at 02:13:21AM -0000, R L wrote:
> decided to give g++ 3.0 a try.  That uses one template class.  It produced 
> code nearly 10x larger and executed over 100x slower.  That code is a bit 
> large to paste here so if anyone wants to see just let me know.

Your hello world program is a bit small to test the differences between
compilers.  Besides, you're not really testing the compiler here but
rather the implementation of libstdc++.  libstdc++ version 3 that comes
with g++-3.0 is probably doing a lot more, in order to conform to the
standard, during 'initialization'.  Even before you reach main().

In order to make real comparisons for the _compiler_, it should not
use libstdc++ (or be using the same version, but thats a bit hard).
In order to check performance independant of library initialization
you will need to write a program that runs for a significant ammount
of time in user space.

-- 
Carlo Wood <carlo@alinoe.com>


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