GNU C++ 4.0.1/4.1.0 cache misses on MICO sources.

Mark Mitchell mark@codesourcery.com
Mon May 23 19:59:00 GMT 2005


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 Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gcc mailing list