guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scm_mark_dependencies & guardians


From: Marius Vollmer
Subject: Re: scm_mark_dependencies & guardians
Date: 19 Jul 2002 20:48:49 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Han-Wen <address@hidden> writes:

> Any comments?  Any objections if I change the code as I proposed?  I
> am a little worried that the above code may be less efficient due to
> less use of goto, but that is something that can be measured.

I don't want to comment on the big picture, just one note: it is
important that marking is done in a 'tail calling' way.  That is, we
must not recurse when marking the spine of a list, for example.  That
is the reason for the goto in gc_mark.

> (Some minutes later: I implemented the change, and measured a 0.4 %
> speed decrease in one particular GC benchmark. I'd say that 0.4% is
> not worth the spaghetti, if it were statistically significant. There
> are no errors from the test suite.)

Hmm, I don't think we should fear goto.  Sometimes it is clearer to
use goto than it is to avoid it.  The main spaghetti in gc.c is the
inclusion in itself.  What about moving the marking code into a
separate file and including it twice?  We already do this for
num2float and num2integral.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]