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

Re: &Rest Lists

> Date: Fri, 1 Apr 88 15:15 EDT
> From: ELIOT@edu.umass.cs

> the fact that &Rest is used in a small minority of function
> definitions, while APPLY is very rare strongly suggests that
> their combined use in a single function call is very rare
> indeed.  Consequently these statistics do not support the idea
> that this case needs to be highly optimized.

While it is true that the statistics do not support the optimization,
there are clearly additional factors to consider (as you have
mentioned).  One is that programmers may avoid this case because they
know it will often be inefficient.  Another is that, in a dynamic
analysis, the cases where the construction is used may turn out to be
important.  I know that I use it less often than I would like to.

> FOO is a null function needed to prevent optimization.
> (dotimes (i 10000000) (cons 1 2)) is optimized to:
> (dotimes (i 10000000) nil) so:

Why isn't it optimized to just NIL?