[ann] Minimal Python project

holger krekel pyth at devel.trillke.net
Sat Jan 11 01:27:37 CET 2003


Edward K. Ream wrote:
> > As Armin Rigo of PSYCO fame takes part in the effort,
> we are confident that MinimalPython will eventually
> run faster than today's CPython.
> 
> This announcement seems to be making a truly remarkable claim, namely that
> one could increase the speed of  C code by recoding it in Python and then
> applying Psycho to it.

Sure, you can't generally get faster than C code.  But then,
we just said faster than CPython (and note 'eventually').  
Armin Rigo gives some ideas in

    http://psyco.sourceforge.net/plans.html

why a Python core can be faster.  Basically, PSYCO can't 
currently do as much with the frame object and Interpreter
(in ceval.c) as it would like to.  

> I am inclined to disbelieve this claim.  Why should Psycho be able to do
> better than an optimizing C compiler applied to hand-written interpreter
> code and/or library code?  The only possibilities I can think of:
> 
> 1. The GIT somehow has access to enough run-time information to perform some
> truly excellent optimizations.

PSYCO currently emits Machine code if it has gathered enough
information.  Several statements can (in extreme cases) collaps 
into one machine instruction.  Armin explained at EuroPython
that this is more a side effect than the result of deeply magic 
special optimizations.

I leave further and more detailed discussion to Armin on the 
pypy list.  There already have been quite some repetitions 
of issues and that is the reason for the mailing list in 
the first place. 

But please note that speed probably won't be the first 
goal for quite some time, anyway. 

regards,

    holger





More information about the Python-list mailing list