This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: length of variable names
- From: mike stump <mrs at windriver dot com>
- To: gcc at gnu dot org, pieter dot deceuninck at cs dot kuleuven dot ac dot be
- Date: Mon, 22 Apr 2002 11:29:42 -0700 (PDT)
- Subject: Re: length of variable names
- References: <02042218062707.16290@galerkin>
> From: Pieter De Ceuninck <pieter.deceuninck@cs.kuleuven.ac.be>
> To: gcc@gnu.org
> Date: Mon, 22 Apr 2002 18:06:27 +0200
> I'm running a small test code to check whether virtual methods are
> significantly slower than templates. I found out that the
> performance of my program is dependent on the length of the class
> name, if I use -O3. I admit, this should not be possible, but I've
> been testing quite a lot and
You will want to check the output of -S, and see what you get. I
suspect that this will turn out to be an alignment issue of some sort.
We squirrel the name of a class away in memory for rtti and exception
handling, this information will change with changes to the class
names. If the length of this changes, the other areas in memory will
move around. When they move around, they can cause performance drops,
or increases.
Also, try an nm with --numeric-sort, and see if any static addresses
change.