1. Re length <Correction>

------=_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"

new topic     » topic index » view message » categorize

2. Re: Re length <Correction>

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu