1 more speed question

Dave Cragg dcragg at lacscentre.co.uk
Thu May 19 08:28:28 EDT 2005


On 19 May 2005, at 11:40, Alex Tweedly wrote:

> Dave Cragg wrote:
>
>
>> This, combined with the slight but consistent speed advantage of  
>> the  first method when referring to fields, makes me think we need  
>> some re- confirmation of the notion that the "limit expression" in  
>> a repeat  loop is only evaluated once.
>>
>
>
> It is stated that way in the docs;  under repeat / with ...
>

Please ignore all my previous comments on this topic. I just now paid  
attention to the test script. The "limit expression" is in an inner  
repeat loop which is within a loop that repeats 1000 times. So  
naturally, the expression is evaluated 1000 times. In the other  
method it is calculated before both loops.

Time for more coffee.

Cheers
Dave


More information about the use-livecode mailing list