[Compiler-sig] Re: [Python-Dev] compiler-sig project for Python 2.3: new AST

Skip Montanaro skip@pobox.com
Tue, 19 Mar 2002 00:16:26 -0600


Naive question, I'm sure, but why do all this in C?  Why not do the compiler
completely in Python and only implement pieces in C that need speeding up?
You already have a byte code compiler written in Python, correct?  How bad
is it performance-wise?  Given the fact that .py[co] files are there to
cache the results, exec and eval are seldom used, and the response time of
interactive sessions is dominated by the user's typing speed, I would think
a compiler written in Python would be fast enough.  All you need is the
bootstrap, and that can probably be handled by distributing .pyc files for
the compiler with the standard distribution.

Skip