Python compilers?

Terry Reedy tjreedy at udel.edu
Sat May 22 11:09:26 EDT 2004


"Heather Coppersmith" <me at privacy.net> wrote in message
news:m23c5smwos.fsf at unique.phony.fqdn...
>
> In _Common Lisp The Language, Second Edition_, by Guy Steele
> (CLTL2), on page 686, in section 25.1.3 ("Compilation
> Environment") there is a lengthy list of assumptions the compiler
> makes, including:
>
>     o ... within a named function, a recursive call to a function
>       of the same name refers to the same function [barring
>       notinline declarations] ...
>
>     o ... a call within the file being compiled to a named
>       function that is defined in that file refers to that
>       function [barring notinline declarations] ...
>
>     o ... the signature (or "interface contract") of all built-in
>       Common Lisp functions will not change ...

Interesting.  PyCode can be sped up by making the same assumptions.
Richard Hettinger's recent recipe implements these assumptions.  (It was
rejected as part of the standard lib for being too implementation specific,
but remains available in the archives and Python Cookbook site.)

[snip less applicable to Python today stuff]

> So compiled Lisp is a less dynamic than Python,

The balance between flexibity and speed continues to be debated by the
developers.

Terry J. Reedy







More information about the Python-list mailing list