[Python-Dev] Optimize Python long integers

Antoine Pitrou solipsis at pitrou.net
Tue Nov 11 14:35:08 CET 2008


Victor Stinner <victor.stinner <at> haypocalc.com> writes:
> 
> I tried to do benchmark on all these patches using pystone or pybench, but the 
> results are inaccurate. Pystone results change with +/- 20% with the same 
> code on different runs. I tried more loops (pystone 250000), but it doesn't 
> change anything. Pybench is better it is also inaccurate to benchmark 
> operations on integers.
> 
> That's I started to write a *basic* benchmark tool to compare the different 
> patches: see file bench_int.py of the issue #4294.

If you want to benchmark arithmetic on large integers, you may try out the
pidigits test from the Computer Language Shootout :
http://shootout.alioth.debian.org/u64/benchmark.php?test=pidigits&lang=python&id=1

cheers

Antoine.




More information about the Python-Dev mailing list