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]
Other format: [Raw text]

Re: [patch] Move loop structures to gc memory


Hello,

> > On 5/17/07, Mike Stump <mrs@apple.com> wrote:
> >> On May 16, 2007, at 5:47 PM, Ian Lance Taylor wrote:
> >> > Putting something in GC memory unnecessarily is inevitably slower than
> >> > not putting it in GC memory, if only because GC requires overhead to
> >> > track objects.
> 
> >> But, the cost can be as cheap as:
> 
> > It's not that cheap right now.
> > Unless you are going to make it this cheap, can we please stop
> > pretending it's this cheap?
> 
> This argument seems backwards.
> 
> If our GC memory allocator is slow, this affects *every* call of
> ggc_alloc.
> 
> Moving objects out of the GC pool because ggc_alloc is slow is a
> local, limited fix, that merely papers over the real problem.

no, it is a proper fix -- it makes us avoid using GC for purposes for
that it is not suitable.

Of course, making GC faster is not a bad idea, but using GC for objects
for that you know exactly the lifetime and the expected usage pattern
at best wastes this extra information you have.

Zdenek


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