Speaking of Filter and Match...
Neville Smythe
neville.smythe at optusnet.com.au
Tue Mar 15 20:40:02 EDT 2022
I just ran a speed test on Dick Kriesel’s method for removing duplicates and keeping the original sort order. It is indeed faster than Jacque’s method
Sorting 11000 lines of text including 1000 duplicated lines:
Jacque’s method: 2.807 seconds [lineoffset is really slow, and in effect the text is scanned 3 times]
Kriesel method: 0.017 seconds
Bu what really made my eyes pop — unless I am doing something wrong, it is faster than using the accepted wisdom of just using “split by cr as set; put the keys” method of removing duplicates and leaving the text unsorted
Split as set, don’t care about sort order method: 0.024 seconds
I can’t see anything wrong with my code, but can someone independently confirm this??
Neville
More information about the use-livecode
mailing list