[Python-Dev] Python 3.3 vs. Python 2.7 benchmark results (again, but this time more solid numbers)

Stefan Behnel stefan_ml at behnel.de
Sun Oct 28 08:37:19 CET 2012


Stefan Behnel, 28.10.2012 08:22:
> Tim Delaney, 27.10.2012 22:53:
>> How much of an effect would it have on startup times and these benchmarks if
>> Cython-compiled extensions were used?
>
> Depends on what and how much code you use. If you compile everything into
> one big module that "imports" all of the stdlib when it gets loaded, you'd
> likely loose a lot of time because it would take a while to initialise all
> that useless code on startup. If you keep it separate, it would likely be a
> lot faster because you avoid the interpreter for most of the module startup.
>
> Most Python code runs about 30% faster when compiled, some faster, some
> slower.

Some more unoptimised pure-Python benchmarks, just in case:

2.7:

https://sage.math.washington.edu:8091/hudson/job/cython-devel-pybenchmarks-py27/lastSuccessfulBuild/artifact/bench_chart.html

3.3:

https://sage.math.washington.edu:8091/hudson/job/cython-devel-pybenchmarks-py3k/lastSuccessfulBuild/artifact/bench_chart.html

Note that the 3.3 benchmarks are not entirely up to date, the last 
successful run was a month ago (likely due to the branch into 3.4 which we 
use since then). Didn't have time to fix them yet.

Note also that the variations are pretty high from run to run as the 
machine that executes them is not a dedicated benchmark server.

Stefan




More information about the Python-Dev mailing list