Speed

Mark Wieder mwieder at ahsoftware.net
Fri Aug 22 19:58:56 EDT 2014


Beat-

Friday, August 22, 2014, 4:31:46 PM, you wrote:

> It might be even faster to do
>    split pData by CR and ":"
>    put the keys of pData into pData
> and that would remove those extra ":"s for you at the same time.

Alex beat me to it. That combination should be much faster.

In addition, you're losing much of the speed of the "repeat for each"
loops by embedding a "repeat with" loop at the deepest level (and in
addition you're making an unneccsary extra copy of tLine each time
through the slowest loop):

repeat for each line tLine in TempPerms1
  repeat with y = Index down to 1
    put tLine into Temp
    put newElement & comma before item y of temp
    put Temp & cr after TempPerms5
  end repeat
end repeat

Something like this should be faster (do this for both upper and lower
halves):

repeat for each line tLine in TempPerms1
  repeat for each item tItem in tLine
    put tItem & comma after TempPerms5
  end repeat
  put cr into char -1 of TempPerms5
end repeat

-- 
-Mark Wieder
 ahsoftware at gmail.com

This communication may be unlawfully collected and stored by the National 
Security Agency (NSA) in secret. The parties to this email do not 
consent to the retrieving or storing of this communication and any 
related metadata, as well as printing, copying, re-transmitting, 
disseminating, or otherwise using it. If you believe you have received 
this communication in error, please delete it immediately.





More information about the use-livecode mailing list