Eric <ericbelcastro@gmail.com> wrote:
+---------------
| Since your conversation brings up the issue, and since I am studying
| the LOOP macro, is APPEND as a LOOP command (within the LOOP body) as
| inefficient as APPEND in its normal sense outside of the LOOP macro?
+---------------
Probably not *quite* as inefficient, since most LOOP implementations
will cache a pointer to the tail of the result list being accumulated,
but some inefficiencies will still remain, since in the presence of
conditionals LOOP's APPEND has no way of knowing that a given list
being appended is going to be the "last" such piece, and thus will
COPY-LIST the last piece unnecessarily. And of course, it will also
have to copy all the earlier pieces as well. [Normal APPEND semantics.]
Using the NCONC keyword, when feasible, should save that copying.
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607