Karel Gardas wrote:
On Mon, 23 May 2005, Mark Mitchell wrote:
Mike Stump wrote:
On May 17, 2005, at 3:16 PM, Karel Gardas wrote:
1) the most expensive seems to be comptypes -- at least from data L2
refill point of view (~17%)
2) comptypes is also the most CPU intensive operation since the most
of time is spent there
I think comptypes can be sped up by canonicalizing types better, and
also adding a conservative hash and checking it first.
We've researched this in detail.
Speeding up comptypes can best be done by calling it less often. One
of the primary uses is the template machinery, which works very hard
to work out whether it already has an existing specialization. The
first step is to insert canonicalizations and other speedups there;
that would reduce the number of calls to comptypes dramatically.
There are also places in the front end that make redundant calls to
comptypes; for example, during declaration processing we sometimes
check whether or not two declarations match more than once.
The changes you suggest might still be helpful, but I'd prefer to see
the bigger algorithms fixed first, as those changes will have
secondary benefits beyond comptypes as well.
Mark,
shall I put some RFE to bugzilla to have it recordered somewhere, or is
this already on your company or team TODO list?
It's certainly well-known here -- but that's not to say it shouldn't go
in some nice FSF-ish place as well in case somebody else wants to work
on it.
--
Mark Mitchell
CodeSourcery, LLC
[EMAIL PROTECTED]
(916) 791-8304