[pypy-dev] Re: psyco in Python was: Minimal Python project
arigo at tunes.org
Sat Jan 18 22:07:27 CET 2003
On Fri, Jan 17, 2003 at 09:32:40AM -0600, Edward K. Ream wrote:
> I challenge this group to provide even one example of Python code, for which
> psyco will emit better code than that produced by a C compiler on a
> transliteration of that code into C. I believe no such counter-example will
> ever be found.
There are tons of other examples of this if one thinks "mini-language
interpretation". For example, a program that asks the user to enter a simple
mathematical function and plots its graph would be seriously faster in
Python+Psyco than in ANSI C. And if you feel that using Python's compile() is
cheating, then write a simple parser and interpreter for the user expressions
(just as you would in C) and it could run faster than C if Psyco were advanced
enough to specialize it correctly.
More information about the Pypy-dev