1. Re length <Correction>
- Posted by Michael Nelson <MichaelANelson at WORLDNET.ATT.NET> Jan 20, 2001
- 496 views
- Last edited Jan 21, 2001
------=_NextPart_000_0045_01C0833C.2EE4D900 charset="iso-8859-1" This is what I get working late at night. The previous benckmark program contains an error--I saved the length outside the outer loop (for i=1 to 100000) rather than outside the inner loop (for j=1 to len), whcih is the correct way to test it. The correct becnchmark program actually shows saving the length to be slower by the trivial amount of .02 seconds per 1000000 tests. -- Mike Nelson ------=_NextPart_000_0045_01C0833C.2EE4D900 name="lentest.EX"
2. Re: Re length <Correction>
- Posted by Colin Taylor <ctaylor at RACSA.CO.CR> Jan 21, 2001
- 482 views
Euman wrote: > I moved the len = length(seq) out of your for loops and > proved that saveing the value of length is the faster method.. The statement len = length(seq) should be placed within the outer timing loop, since there may be a time cost associated with it. I get the same time result for both methods, which makes me think that Euphoria has the sequence length saved as an internal variable, which can be accessed just as fast as any other variable. - Colin Taylor