On Oct 1, 2009, at 12:07 PM, Stefan Behnel wrote:

> Hi all,
>
> for a talk I'm about to give, I ran the pybench benchmark with
> cython-unstable. I had to fix up the sources a tiny bit (nothing that
> impacts the results) and select the benchmarks that actually compile
> (mostly due to inner classes being used). It's run like this:
>
> PYTHONPATH=. python2.6 -c 'import pybench; pybench.PyBenchCmdline()' \
> --debug -w 1 -n 5 -f results-cython.pybench -t \
> 'Arithmetic|IfThen|Loops|Dict|Try.*Except|Import|List|Compare| 
> String|Tuple|Unicode'
>
> FWIW, both the Python 2.6.2 interpreter and the Cython generated C  
> modules
> were built on the same machine with the same CFLAGS.
>
> The sources I used are here:
>
> http://codespeak.net/lxml/pybench.tar.gz
>
> I attached the results.
>
> I left out the CompareIntegers/Floats/etc. benchmarks as they only  
> compare
> numeric literals, which ends up in the C code as, well, a  
> comparison of
> literals, so that the C compiler finds a lot of dead code to  
> discard. The
> resulting 100% speedup isn't really that informative.
>
> Note that the numbers are for plain Python code without any type
> annotations, so a lot of possible optimisations are not even used.
>
> However, the remaining total improvement of almost 33%, and the huge
> speedups for control structures (especially loops) and builtin  
> types is
> clearly worth a look.

Cool.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to