The Python "Need for Speed" Sprint
Posted May 28, 2006 21:32 UTC (Sun) by
jengelh (subscriber, #33263)
Parent article:
The Python "Need for Speed" Sprint
We started the week with the Python 2.5 alpha 2 release candidate being around 10% slower than 2.4.3, the previous stable release. Largely, this slowdown is due to newly added features, particularly a change in the object type of exceptions which is showing a 60% slowdown.
That's quite heavy. Python already runs slower than Perl for a given program ("converting" a binary file to a C source file),
$ time png2c.pl -C images.cpp -H images.hpp sside.png ssplash.png vsplash.png; time png2c.py -C images.cpp -H images.hpp sside.png ssplash.png vsplash.png;
real 0m0.499s
user 0m0.460s
sys 0m0.040s
real 0m1.679s
user 0m1.650s
sys 0m0.030s (both are hot runs, i.e. all used files have been cached by the kernel before)
Either I suck at writing Python, or regexes are in fact slower. This is Python 2.4.2. (Post a comment if you want the progs.)
(
Log in to post comments)