On 2/11/14, 9:48 AM, Bob Sneidar wrote:
For small tasks though, your users will not even be able to blink
before 100,000 simple repeats are executed. I ran a 100,000 count
loop with nothing in the repeat loop to do and it took 1 tick. ONE
TICK! The repeat loop is NOT what slows things down!
Well, it depends. Try running your repeat loop with even a single line
of code inside and use the form "repeat with x = 1 to 100000". That's
the slowest way to do a repeat loop and I think you'll see a difference,
particularly if the single line of code accesses any part of the current
line. Every time through the loop, the engine has to count from 1 all
over again.
For example, try this and compare with your previous results:
put my100000lineData into tData
repeat with x = 1 to 100000
get word 1 of line x of tData
end repeat
If you get word 10 of each line it will slow down more while the engine
counts not only the line number but also the word number.
Benchmarks would be interesting, if anyone has time to try it.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode