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

Jeremy Hylton jeremy@zope.com
Wed, 20 Mar 2002 18:27:05 -0500


> 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?

Really bad <wink>.

I haven't done a benchmark in a long time, but I recall that
the compiler-in-Python is at least 100x slower than
compiler-in-C.  This makes starting up the interpreter to
execute a small script quite slow.

IIRC the Python .NET compiler is implemented in Python and
its slowness was cited as a serious drawback in the summary
paper available from the AS web site.

Jeremy