This is the mail archive of the
mailing list for the GCC project.
Re: Faster compilation speed
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, Richard Henderson <rth at redhat dot com>, "David S. Miller" <davem at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 14 Aug 2002 21:20:22 +0100
- Subject: Re: Faster compilation speed
- References: <email@example.com> <200208141907.PAA25748@makai.watson.ibm.com>
David Edelsohn wrote:
> I thought that obstacks are created dynamically, not statically.
> One does not want to ever copy or grow the array.
Obstacks use chunks of memory to hold many contiguous objects, so they
offer fairly good spatial locality. But then, so do many decent GC
allocators (not ones using free lists, though).
> Statically allocating some of the large, persistent, sequential
> collections of objects would help locality.
Linus and David are suggesting that temporal locality of short-lived
objects is important -- i.e. reuse of memory from freed objects.