This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target FUNCTION_{PRO,EPI}LOGUE question
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: Target FUNCTION_{PRO,EPI}LOGUE question
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 01 Jul 2001 12:22:50 -0700
- CC: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, gcc at gcc dot gnu dot org
- CC: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- References: <20010701193806.D12236@daikokuya.demon.co.uk>
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>