guile-devel
[Top][All Lists]
Advanced

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

Re: truth of %nil


From: Andy Wingo
Subject: Re: truth of %nil
Date: Sun, 05 Jul 2009 10:19:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

On Sun 05 Jul 2009 03:41, Mark H Weaver <address@hidden> writes:

> Below is a proposal for how to make boolean tests and end-of-list
> tests faster and more compact, by renumbering the representations for
> SCM_ELISP_NIL, SCM_EOL, SCM_UNDEFINED, and SCM_EOF_VAL.

That looks like great work, Mark!!

I don't think it's a problem to renumber these constants, no. A couple
of questions though:

>       loop1(int *p)
>       {
>         while (*p != 0x004)
>           p++;
>       }

Did you mean while (p != 0x004) ?

Also, can you make a third test, equivalent to p == SCM_EOL || p ==
SCM_ELISP_NIL ?

> The size of the resulting loop bodies, in bytes, are as follows:
>
>       arch   loop1   loop2
>       --------------------
>       x86-32   8      13
>       arm     12      16
>       sparc   16      20
>       --------------------
>
> I guess this is not too bad.

I realize this is a bit of a silly benchmark, but can you time these?
Actually, can you time Guile? The changes to Guile should be minimal,
after all.

> What do you think?

Excellence, good sir, excellence!

Andy
-- 
http://wingolog.org/




reply via email to

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