On Sun 05 Jul 2009 03:41, Mark H Weaver <m...@netris.org> 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/