Speed Bump
Scott Rossi
scott at tactilemedia.com
Fri Feb 10 02:06:20 EST 2006
Greetings List Folks:
I'm wondering if there's any possible way to trim down the processing time
required by the following function which takes two sets of data with the
same number of items, compares the value of each item, and returns a max set
of data:
on mouseUp
repeat 50000
put random(255) & "," after set1
put random(255) & "," after set2
end repeat
answer "Ready to compare"
put the seconds into tStart
get compareData(set1,set2)
put the seconds - tStart
answer "Done"
end mouseUp
function compareData set1,set2
repeat for each item V in set1
put max(V,item 1 of set2) after tData
delete item 1 of set2
end repeat
return tData
end compareData
On my 600mHz machine this takes about 8 or 9 seconds. Increasing the item
count to 100,000 requires 41 seconds. Ideally, it would be nice to do
100,000 items in a few seconds. Impossible? Any thoughts?
Thanks & Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list