You may be thinking of Pyrex, a Python dialect that compiles to C and lets
you mix C and Python data types:
Pyrex is really quite nifty, especially for writing C extensions to Python
and for wrapping existing C libraries. You can still code in Python or close
to it, and let Pyrex write all the boilerplate C code for you. For
performance critical algorithms, if you're using C types the generated code
should be as fast as any other C code.
Kind of like Rubyinline http://www.zenspider.com/ZSS/Products/RubyInline/
Or C-Generator http://redshift.sourceforge.net/cgen/
Psyco, OTOH, works with standard Python code. It's essentially a Just In
Time compiler for Python:
Psyco isn't part of the standard Python distribution--you need to install
the Psyco module and add this to the top of your source file:
import psyco; psyco.full()
But that's all there is to it. There's nothing special about the
language--it's standard Python.
From what I've heard, though, it doesn't let you do certian things that
would be allowable in standard Python.
Psyco is only for x86 at the moment, but it can really pep up Python code on
What's fair for performance comparisons? Well, a thorough language benchmark
would measure Psyco, standard cPython, and Jython times for x86, plus
cPython and Jython for other popular processors.
Would it be fair to use Rubyinline? ( I wouldn't think so, but opinions my
These are all Open Source, so don't let anybody stop you from porting them
Some of these ideas are being worked on. And some projects exist already
(see above links).