In article <10d50t0qrc0sl93 / corp.supernews.com>, Michael Geary <Mike / DeleteThis.Geary.com> wrote: >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. 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: > >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. 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 >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. Would it be fair to use Rubyinline? ( I wouldn't think so, but opinions my vary.) > >These are all Open Source, so don't let anybody stop you from porting them >to Ruby... :-) Some of these ideas are being worked on. And some projects exist already (see above links). Phil