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

Skip Montanaro skip@pobox.com
Wed, 20 Mar 2002 19:14:18 -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?

    Jeremy> Really bad <wink>.

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

Okay, so let's see what hotshot says...  Is it obvious how I run the
Python-based compiler (e.g., is there a main program script somewhere)?

Skip