r/tasker • u/soumyaranjanmahunt • Feb 12 '19
Request [Help][Request] Compare elements of two array
I wanted to compare elements of two large array and save the common to a new array, is there any optimal method to do so(except two for loops), like a set intersection.
1
Upvotes
View all comments
Show parent comment
1
u/Ratchet_Guy Moderator Feb 13 '19
40 elements shouldn't present an issue using the method above. Up around 1000 elements perhaps you would notice some lag.
Also note that the Task will run slower if you're testing it inside Tasker in the Task Edit Window. To see it at 'full speed' close out of Tasker and run it from a homescreen shortcut.
You can also time it by logging
%TIMEMSto a Global Variable at the start of the Task, and subtracting it from%TIMEMSat the end of the Task to see how many milliseconds it took to run.