This is the mail archive of the
mailing list for the GCC project.
Re: PATCH [mainline] speed up comparing enums declared in multiple translation units
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Fariborz Jahanian <fjahanian at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Tue, 9 Mar 2004 12:27:52 -0800
- Subject: Re: PATCH [mainline] speed up comparing enums declared in multiple translation units
- References: <37BA97A6-7206-11D8-9E92-000A95BA54A6@apple.com>
On Mar 9, 2004, at 12:13, Fariborz Jahanian wrote:
This is a performance bug fix which prevents mesa (SPEC program) to
compile with IMA in a
reasonable amount of time. Performance hit is comparing two enumerated
types declared in
different translation unit. Fix is in routine
tagged_types_tu_compatible_p and uses
the infrastructure already there to prevent recursion when comparing
Essentially it remembers previous comparison results of the two enum
types and uses the
saved result. bootstrapped, dejagnu tested on ppc-darwin. Furthermore,
SPEC benchmark with IMA. mesa now takes minutes to compile, instead of
days (on my
particular G5 machine anyway).
OK for mainline?
Why are you getting rid of the code which I put in there to speed it up
in the first place?
"Speed up the case where the type values are in the same order".
Now I know with my patch it takes only about an hour on my laptop to
compile with my patch
(this is a 800MHz G4).
Also it looks like your patch can make a huge memory problem with many
As you can produce n^2 mallocs which can cause even worse problems,
there has to be a better
way than both of our solutions.
Can you try again mesa with my patch already applied as it looks like
you did not?