What If Python Replaced Elisp?

Kragen Sitaker kragen at dnaco.net
Thu Mar 9 23:00:20 EST 2000


In article <slrn8cg5em.vo4.kc5tja at garnet.armored.net>,
Samuel A. Falvo II <kc5tja at garnet.armored.net> wrote:
>In article <usny1a3kf.fsf at sandia.gov>, taashlo at sandia.gov wrote:
>>I saw a comparison of Lisp and Python at
>><http://www.norvig.com/python-lisp.html> which stated that Lisp can be
>>about 100 times faster than Python.  I'm going to assume that this
>
>I think this has a lot to do with the "explicit syntax tree" that you build
>with LISP programs.  Think about it -- the structure of LISP programs
>directly mirrors an equivalent semantic tree built with a traditional
>compiler, like C.  As a result, the same types of optimizations that are
>possible with languages like C are possible with the likes of LISP too.

Well, the result of the syntax tree being explicit is that parsing is
faster and quicker to code.  As you point out, it doesn't have anything
to do with the speed of the resulting code.

However, there are optimizations that are straightforward with C that
are not as straightforward with Lisp; Lisp is dynamically-typed, for
example.

>Many LISP environments compile to raw assembly language too, though I
>somehow doubt elisp does this.

It doesn't.  It's also not 100 times faster than Python.

>There is little, if anything, preventing this type of optimizability in
>Python as well -- I recall a discussion from a friend of mine (Billy
>Tanksley) from before I regularly read this newsgroup, indicating a desire
>to switch from plain bytecodes to three-operand RISC-like, platform
>independent, fixed-width codes.

Well, Python is probably not as hard to optimize as Lisp and Scheme
dialects.  But it certainly is not as easy as C.

>>Would the GUI be improved by using Tkinter or wxWindows?
>
>I would like to see GTK myself.  Tkinter just "feels" wrong to me for some
>reason.

I take it you've developed applications with both?  I'd be very
interested in reading brief case-studies of each.  Even a paragraph on
each would be great.
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either.  :)



More information about the Python-list mailing list