Python execution speed

Peter Hansen peter at engcorp.com
Mon Nov 19 20:18:35 EST 2001


"Morten W. Petersen" wrote:
> 
> I started a thread about a week ago, asking about benefits of moving
> from Python to Common Lisp.
> 
> I've done some more research and 'heard' that Lisp can be up to 80% of the
> speed of programs written in C (compiling the Lisp code).
[...]
>   1. What is the plan for psyco (inclusion in the standard distribution, etc) ?
>   2. Will there be a JIT compiler for Python ?
>   3. Are there any similar efforts for Jython [5] ?
>   4. Are efforts made to optimize Python's execution speed in general ?

Interesting questions, for which I have no answers. :)

I'm curious, however, why you believe you need to optimize Python's
execution speed so much?  Do you have some application which is not
performing adequately?  The usual approach is simply to profile the
code and recode the "hot spot" in C.

(I'm training myself never to optimize before the code is working,
and only when it is not fast enough to meet defined requirements,
and only after adequate profiling.  Since this means I almost 
never spend _any_ time optimizing code, I just keep an eye out for
what sounds like too much attention paid to unnecessary speedups.)

Cheers,
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list