Reputation: 545
I just installed python 2.7 and find it to be 25-30% slower than 2.6 . When I run a program of mine under 2.7, it takes 1m17s, while under 2.6 that same prog takes 0m57s. Is this common?
Included in the upgrade are numpy 1.6.1 (from 1.6.0), pandas 0.4 (from 0.3), and maybe other things.
Upvotes: 4
Views: 883
Reputation: 10081
I would suggest using the profile module to see where it is being slowed down. It could be one or all of the major version changes.
I would suggest first profiling your old program and then the new version of your program and compare the outputs.
EDIT: While the pandas module has become more slow there could potentially be other modules that have also slowed down.
Upvotes: 0
Reputation: 545
My code make heavy use of the pandas module. I wrote to its creator, Wes McKinney, and sent him profiles of code from Python2.6/Pandas0.3 and Python2.7/Pandas0.4. He found it was pandas that had changed (and slowed for my use, though perhaps not in general) and added some optimizations to help me out. Now my 2.7/0.4 code is faster, no slower than before.
Upvotes: 2