emacs-devel
[Top][All Lists]
Advanced

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

mapc vs while


From: Dan Nicolaescu
Subject: mapc vs while
Date: Thu, 23 Nov 2000 09:56:59 -0800

Hi!

Has somebody done some profiling on mapc vs while? Or is there any
reason for mapc to be faster? 

I am refering to the fact that in the emacs sources there are a lot of
code sequences like:

(setq first (car lst))
(while first
  (do-stuff-with-first
  ... ...       
        )
  (setq first (car lst)))

Is it preferable to replace them with:

(mapc (lambda (x)
        ... ...)
        lst)

Is there an official position on this? It would be nice to have a note
about such usage in the NEWS file.

Thanks.
        --dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]