1 more speed question

J. Landman Gay jacque at hyperactivesw.com
Wed May 18 23:03:53 EDT 2005


On 5/18/05 7:45 PM, Dar Scott wrote:

> 
> On May 18, 2005, at 4:31 PM, Mark Wieder wrote:
> 
>> Putting the limit into a variable speeds things up considerably:
>>
>> put the number of controls on card id 200593 of stack "revIcons" into y
>> repeat with x=1 to y
>>  add 1 to z
>> end repeat
> 
> 
> 6.9 ms
> 
>>
>> Is twice as fast (.73 ticks vs 1.41 ticks) as:
>>
>> repeat with x=1 to the number of controls on card id 200593 of stack 
>> "revIcons"
>>  add 1 to z
>> end repeat
> 
> 
> 6.9 ms
> 
> Did you forget to put the 'put' inside your timing?  Or are we seeing 
> your clock resolution?
> 
> I tested two ways with Rev 2.5.1 OS X dual 1.25 GHz.
> 
> I think the latter is slightly faster.

This came up on the MetaCard list back in the dark ages. Scott Raney 
said the engine figures out the variable so we don't have to, and the 
two should be identical in speed.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list