[Python-Dev] Python is faster than C

Armin Rigo arigo at tunes.org
Tue Apr 6 10:33:56 EDT 2004

Hello Dave,

On Tue, Apr 06, 2004 at 09:06:16AM +1000, Dave Cole wrote:
> Would it make sense to build specialisation into the base Python
> interpreter so that it builds specialised versions of bytecode for
> functions.  I am assuming that there are only a few types that can be
> targeted by specialisation (int, float).  Bytecodes then could be added
> to the interpreter which operate on those native machine types rather
> than the Python objects.

This is a kind of project that would give a good speed-up with limited changes
in the Python interpreter, though it is still relatively involved.  Whether
someone shows up to actually implement and maintain it is another matter.  
Moreover there are a few dark spots that are easily overlooked; for example,
any operation between ints could actually return a long.  Psyco itself is very
different and copes well with this problem (and can do more than only
easy-typed locals).

A bientot,


More information about the Python-Dev mailing list