What If Python Replaced Elisp?

Jon K Hellan hellan at acm.org
Thu Mar 9 03:58:13 EST 2000


Matt Curtin <cmcurtin at interhack.net> writes:

> Obviously, how much of a difference there will be will depend largely
> on the specific task at hand.  However, I think it's probably safe to
> say that byte-compiled XEmacs Lisp is much faster than Python on
> average.  It would be interesting to do some tests to see just what
> kind of difference there is.

This example is from ch. 14 of the Emacs Lisp Reference manual:

     (defun silly-loop (n)
       "Return time before and after N iterations of a loop."
       (let ((t1 (current-time-string)))
         (while (> (setq n (1- n))
                   0))
         (list t1 (current-time-string))))

(Automatically byte compiled) Python: 280 000 iterations/s
Byte compiled Emacs Lisp:             520 000 it/s
Byte compiled Xemacs Lisp:            820 000 it/s
Compiled Allegro Common Lisp:     110 000 000 it/s
C (-O2 and up):                   110 000 000 it/s

Setup: AMD K6 233 MHz, 64 MB RAM.

Hope this helps:

Jon Kåre



More information about the Python-list mailing list