This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Speeding up type lookup
- To: martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: Re: Speeding up type lookup
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sat, 18 Mar 2000 10:15:29 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200003181748.SAA31667@loewis.home.cs.tu-berlin.de>
>>>>> "Martin" == Martin v Loewis <martin@loewis.home.cs.tu-berlin.de> writes:
Martin> When profiling gcc, I noticed that a measurable amount of
Cool -- you're profiling. Most excellent.
Martin> time is spent in type_hash_lookup. Upon further
Martin> investigation, I found that this is due to the large
Martin> number of collisions in the hash table, which requires a
Martin> deeper analysis of the types to determine equality. In one
Martin> of my examples, there where 250 types for a single hash
Martin> bucket; for a trivial 'int main(){}' c++ program, there
Martin> are up to three collisions.
The right thing to do is to use the new automatically expanding hash
tables in libiberty, and ditch the ad-hoc hash table in tree.c. That
will solve the problem, even for very large compilations. Would you
be willing to tackle that instead?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com