Speed quirk: redundant line gives six-fold speedup
Mark Dickinson
dickinsm at verizon.net
Thu Aug 25 14:05:02 EDT 2005
In article <mailman.3521.1124991042.10512.python-list at python.org>, Bill
Mill <bill.mill at gmail.com> wrote:
> One of my own: what in the world made you think "maybe I'll add 29
> dummy global variables to speed things up?"
You mean this isn't a well-known optimization technique? :)
I was refactoring the code, and after making a particular function
redundant I noticed that removing the code for that function produced
the slow down described. Then I naturally experimented to try to figure
out what I had to put back in to recover the original speed.
Not that I really care about the speed itself, but I'd dearly like to
understand what's at work here.
Mark
More information about the Python-list
mailing list