From: Barry Margolin Subject: Re: Please help Date: 1999/04/08 Message-ID: #1/1 X-Deja-AN: 464107097 Distribution: world References: <01be763a$7e1f16e0$LocalHost@ppnorn.atlant.ru> <370BB3F2.A36081F9@computer.org> X-Abuse-Info: Otherwise we will be unable to process your complaint properly X-Complaints-To: abuse@gtei.net X-Trace: oKCy3P3T5+Zox+H34LL99PT78fe/4Pfz9vfg4bKmLjK8oaAuq6Wyssb6574goqqyQeLgIIerqzmy!o6Wop6Kooqey1d9U Organization: GTE Internetworking, Cambridge, MA X-Copies-To: never NNTP-Posting-Date: Thu, 08 Apr 1999 17:50:05 GMT Newsgroups: comp.lang.lisp Originator: bar...@bbnplanet.com (Barry Margolin) In article , Joerg-Cyril Hoehle wrote: >While I don't like push+nreverse myself, I cannot agree that this is >inefficient or that loop is faster. loop has to do very similar work >(destructive update) in this case, like you observe (remember that >nreverse can do its job in one pass). Whether this is done when an >element is collected or after all have been collected is IMHO much >more architecture- and cache- than language-dependent. I'll wager that almost all LOOP and COLLECTING macros implement this by maintaining a tail pointer and RPLACDing it as new elements are collected. This is the type of thing that's a pain to write each time you do it, but macro implementers are practically *expected* to do it for us. There are very few architectures where this isn't the best way to do it; this technique won't generate cdr-coded lists, but neither will the push+nreverse. -- Barry Margolin, bar...@bbnplanet.com GTE Internetworking, Powered by BBN, Burlington, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.