[Python-Dev] Pie-thon benchmarks

Guido van Rossum guido at python.org
Mon Dec 15 14:37:34 EST 2003

> At 11:05 AM -0500 12/15/03, Tim Peters wrote:
> >[Michael Hudson]
> >>  If something important -- like a pieing <wink> -- depends on it, and
> >>  the ints are long enough, it's not that hard to do better than
> >>  Karatsuba multiplication...
> >
> >"Not that hard" depends on your background.  The idea is to bury Dan under
> >esoteric algorithms from a huge number of obscure specialties <wink>.

[Dan Sugalski]
> Heh. You're expecting me to do far too much work. I plan on tackling 
> bytecode optimization only if it turns out that a straightforward 
> transform from python bytecode to parrot bytecode is isn't 
> sufficiently faster than CPython. Funky algorithms expressed entirely 
> in python bytecode won't make much of a difference...

But Karatsuba multiplication and Timsort are implemented highly
efficiently in C, and are part of the "full set of standard builtins"
to which we agreed.

BTW, eval() is also part of that full set, and exec is part of the
language.  These invoke the Python bytecode compiler.  (And Jim
Hugunin's IronPython is really slow on this, like 60x slower than
CPython; I think Jim reported that Jython was 20x slower on exec().)

How do you plan to handle these?  What if the entire benchmark was
given as a triple quoted string that was passed to the exec statement?

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list