Speed quirk: redundant line gives six-fold speedup
Erik Max Francis
max at alcyone.com
Thu Aug 25 19:22:08 CEST 2005
Mark Dickinson wrote:
> (1) Can anyone else reproduce this behaviour, or is it just some quirk
> of my setup?
> (2) Any possible explanations? Is there some optimization that kicks
> in at a certain number of lines, or at a certain length of
> (3) If (2), is there some way to force the optimization, so that I can
> get the speed increase without having to add the extra lines?
I see no difference in execution times, as expected. The most likely
explanation is simply that other things were going on on your system
when you ran the first test, but not the second test, resulting in the
discrepancy. In other words, the speed change had nothing to do with
your dummy lines.
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
There never was a good war or a bad peace.
-- Benjamin Franklin
More information about the Python-list