benchmark

Terry Reedy tjreedy at udel.edu
Thu Aug 7 20:58:41 CEST 2008



M8R-n7vorv at mailinator.com wrote:

> Is there any reason why the psyco is not a part of the core python
> feature set ?

Psyco was a PhD project.  I do not believe the author ever offered it. 
Last I knew, it was almost but not completely compatible.

> Is there a particular reason it is better to be kept as
> a separate extension ?

If he did, he would have to commit to updating it to work with new 
version of Python (2.6/3.0) which I don't believe he wants to do.  Last 
I know, he was working with the PyPy project instead and its JIT 
technology.  On the otherhand, extensions are also restricted by 
Python's release schedule, including no new features in bug-fix 
(dot-dot) releases.  So library extensions need to be rather stable but 
maintained.

 > Are there any implications of using psyco ?

It compiles statements to machine code for each set of types used in the 
statement or code block over the history of the run.  So code used 
polymorphically with several combinations of types can end up with 
several compiled versions (same as with C++ templates).  (But a few 
extra megabytes in the running image is less of an issue than it was 
even 5 or so years ago.)  And time spent compiling for a combination 
used just once gains little.  So it works best with numeric code used 
just for ints or floats.

Terry J. Reedy




More information about the Python-list mailing list