Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: Speed of DOLIST vs. MAP... (was: Mapping is beautiful) Message-ID: <4205@skye.ed.ac.uk> Date: 21 Feb 91 19:12:07 GMT References: <67@san-jacinto.cs.utexas.edu> <1991Feb21.000741.455@Neon.Stanford.EDU> Reply-To: jeff@aiai.UUCP (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 10 In article <1991Feb21.000741.455@Neon.Stanford.EDU> michaelg@Neon.Stanford.EDU (Michael Greenwald) writes: >DOLIST is often optimized better (i.e. produces faster code) than MAP >because DOLIST is a macro (so it's inlined and in addition to saving >the function call (which might not be very expensive, anyway) >additional optimizations might be applicable). But it's very common for MAPC to be compiled in-line, as if it were a macro, when possible. Franz Lisp did this. I'm sure at least some Common Lisps do also.