[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scm_gc_mark
From: |
Michael Livshin |
Subject: |
Re: scm_gc_mark |
Date: |
31 Jan 2001 18:16:32 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Crater Lake) |
Keisuke Nishida <address@hidden> writes:
> scm_gc_mark() returns immediately if the object is SCM_IMP.
> Isn't it better to define it like this?
>
> #define scm_gc_mark(x) \
> do { if (SCM_NIMP (x)) scm_i_gc_mark (x); } while (0)
could be faster, yes. as with all things involving frequently and
recursively called functions, a real improvement is not certain (it
may sound paranoid, but I speak from (some) experience).
if you benchmark and see an improvement, feel free to make this
change. be sure to benchmark with deeply nested data structures;
cons-trees with deep nesting _both_ in the car and the cdr are best
(and easiest to generate) for making scm_gc_mark() eat huge quantities
of stack space.
or don't, and I'll get around to it. eventually.
thanks,
--mike
--
He who joyfully marches to music rank and file, has already earned my
contempt. He has been given a large brain by mistake, since for him
the spinal cord would surely suffice. -- Albert Einstein
- scm_gc_mark, Keisuke Nishida, 2001/01/30
- Re: scm_gc_mark,
Michael Livshin <=