[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
&Rest Lists
re: > 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?
Conjecture: it is an easy optimization to notice that a side-effect-free
function is being called in a place where no values are expected back (i.e.,
the call is only "for effects"); but it is much harder to have an analyzer
for tagbodies which usefully notices that they "don't do anything".
-- JonL --
- References:
- Re: &Rest Lists
- From: Jeff Dalton <jeff%aiva.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>