This is the mail archive of the gcc@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: Target FUNCTION_{PRO,EPI}LOGUE question



Neil Booth <neil@daikokuya.demon.co.uk> writes:

> Fergus Henderson wrote:-
> 
> > >    for (each root in all_ggc_roots)
> > > 	root->vtable->gc_collect ();
> > 
> > (The virtual function should be called gc_mark() not gc_collect(), I think.)
> 
> You're right.
> 
> > I'm not convinced that this approach would be significantly more efficient.
> 
> I'd be surprised if it didn't give a 50% win - you've got single
> instructions that go directly to the relevant code, in place of
> function functions calls, comparisons and switch statements.  I've not
> got any benchmarks, of course :-) Further, if you're garbage
> collecting 50,000 items, say (I'm not sure of the number of items in
> an average collection, but I imagine it's not far off this), I think
> that hand-coded stack can get pretty big quite easily.

I wouldn't worry too much about the GC parts of this, as all that code
will go away as soon as the PCH work is contributed (and you'll have a
different and more complicated set of problems).

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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