On 03/12/2018 14:51, Håkan Liljegren via use-livecode
<use-livecode@lists.runrev.com> wrote:
and you can also shave off some milliseconds in the styledText version by using
foreach:
…
It is a bit strange though that the foreach always seams to be faster. If we
try to sum an array with 100 000 element like:
I know you were demonstrating the difference between "repeat for each
key" and "repeat with i=", and using 'sum' to do so (very effectively).
But for completeness, just in case someone wanted to sum an array, I
would point out that you could also do
put the long seconds into tStart
put sum(tData) into tSum3
put the long seconds - tStart into tTime3
and that would another 4x faster again :-)
Alex
_______________________________________________
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