[Python-Dev] Pie-thon benchmarks

Dan Sugalski dan at sidhe.org
Mon Dec 15 14:51:39 EST 2003

At 11:37 AM -0800 12/15/03, Guido van Rossum wrote:
>  > 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.

In which case, well... time for me to write some C code.

>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?

We agreed no eval as part of this challenge, since the point was the 
speed of the interpreter engine not of the compiler. I don't see that 
on the list of challenge points you posted earlier, though, so it was 
either omitted inadvertently or I got snookered. The former, I expect.

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan at sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

More information about the Python-Dev mailing list