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
_______________________________________________
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

Reply via email to