This is the mail archive of the
mailing list for the GCC project.
Re: Abnormally large executable with gcc 3.0
- To: R L <ral at hotmail dot com>
- Subject: Re: Abnormally large executable with gcc 3.0
- From: Carlo Wood <carlo at alinoe dot com>
- Date: Sat, 26 May 2001 04:43:34 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <F31MXehYSoOZzHZlJ2H0001a0af@hotmail.com>
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 <firstname.lastname@example.org>