Python 2.7 vs 2.6 speed on Windows

I just installed python 2.7 and found that it is 25-30% slower than 2.6. When I run my program under 2.7, it takes 1m17s, and under 2.6 the same prog takes 0m57s. Is this common?

The update includes numpy 1.6.1 (from 1.6.0), pandas 0.4 (from 0.3) and, possibly, other things.

+4
source share
2 answers

My code makes heavy use of the pandas module. I wrote to my creator Wes McKinney and sent him code profiles from Python2.6 / Pandas0.3 and Python2.7 / Pandas0.4. He discovered that this had changed (and slowed down for my use, although perhaps not overall), and added some optimizations to help me. Now my 2.7 / 0.4 code is faster, not slower than before.

+2
source

I would suggest using the profile module to see where it slows down. This may be one or all major version changes.

I would suggest first profiling your old program and then a new version of your program and compare the results.

EDIT: While the pandas module became slower, there could potentially be other modules that also slowed down.

0
source

All Articles