1 more speed question

jbv jbv.silences at Club-Internet.fr
Wed May 18 14:01:20 EDT 2005



Jan,

Thanks for the explanation, but as for your
example :

repeat for each line tLine in tLongList
  get tLine
  ## now do everything with it
end repeat

what if I need to replace tLine in tLongList
after some processing on each line ?

JB

>
> Hi JB,
>
> Rest assured that 'repeat for each' is tha fastest
> construct by its very nature : the engine knows it's
> going through the whole varible, and keeps track of
> where it's at, saving it from counting he number of
> lines all over again.
> However, 'it' is a special variable, and probably
> resides in the 'stack' part of the memory rather than
> the 'heap' where the engine keeps close tabs on it.
> So you would probably get the best performance if you
> use something like:
> --
> repeat for each line tLine in tLongList
>   get tLine
>   ## now do everything with it
> end repeat
> --



More information about the use-livecode mailing list