This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Speedup hashtables, ASM_OUTPUT_SECTION_NAME


  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]