This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Speedup hashtables, ASM_OUTPUT_SECTION_NAME
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: PATCH: Speedup hashtables, ASM_OUTPUT_SECTION_NAME
- From: Jeffrey A Law <law at redhat dot com>
- Date: Tue, 28 Nov 2000 21:48:32 -0700
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <20001126202302H.mitchell@codesourcery.com>you write:
>
> I've started attacking the low-hanging fruit for a test-case that
> Gerald sent me. Using the profiler, I fould some surprising culprits
> near the top of the chain:
>
> - higher_prime_number in hashtab.c
>
> This function used the seive of Erosthosthanes (sp?) to compute
> prime numbers. If we really needed to do that, we should use
> some probabilistic method (e.g., Rabin) but we don't -- we just
> need a table.
Actually, not surprising :-) On the PA this shows up as an insane amount
of time spent in divmod related code from a system library.
> - ASM_OUTPUT_SECTION_NAME
>
> This function kept a linked list of all the sections that had
> been output. In C++, when you can have *lots* of sections due
> to how we implement templates, this was very bad. I switched
> this to use a hashtable. (Also, thanks to the stringpool
> stuff, we no longer have to copy the section name for the section
> table, which makes for some memory savings, too.)
Wow. This one is a surprise :-)
pa-64.h would probably benefit from a similar change. I'll twiddle it shortly.
jeff