Re: Speed quirk: redundant line gives six-fold speedup



Mark Dickinson wrote:

Questions:

(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
    bytecode?
(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@xxxxxxxxxxx && 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
.



Relevant Pages

  • Re: How to find the datatype of a variable?
    ... the first test came out noticeably slower than the ... Fifth, the optimization "Remove Integer Overflow ...
    (microsoft.public.vb.general.discussion)
  • Re: Measuring processor speed
    ... -> Mark Dodel wrote: ... -> speed change? ... I guess the default is to disable the optimization which isn't ... Thanks for the suggestion. ...
    (comp.os.os2.misc)