[Compiler-sig] Re: [Python-Dev] compiler-sig project for Python 2.3: new AST
Jeremy Hylton
jeremy@zope.com
Thu, 21 Mar 2002 00:37:32 -0500
On Wed, 20 Mar 2002 19:14:18 -0600
Skip Montanaro <skip@pobox.com> wrote:
> 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)?
Try "pydoc compiler" for the details. You could compare the
performance of compiler.compile() against builtin compile().
I seem to recall that about 1/3 of the time was spent
transforming the parser module output into the AST.
Jeremy