Phil Tomson wrote:
Isn't psycho kind of a special varient of Python? Is it fair
to compare psycho Python in the language shootout (they
should probalby use the more widely used PythonC).
You may be thinking of Pyrex, a Python dialect that compiles to C and lets
you mix C and Python data types:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
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.
Psyco, OTOH, works with standard Python code. It's essentially a Just In
Time compiler for Python:
http://psyco.sourceforge.net/introduction.html
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.
Psyco is only for x86 at the moment, but it can really pep up Python code on
the x86.
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.
These are all Open Source, so don't let anybody stop you from porting them
to Ruby...
-Mike