Speed testing: Fastest search method
Peter Haworth
pete at lcsql.com
Tue Sep 2 15:48:53 EDT 2014
On Mon, Sep 1, 2014 at 5:58 PM, Geoff Canyon <gcanyon at gmail.com> wrote:
> All justifications aside, I'd use method 3 all the time unless something
> broke. ;-)
>
A recent post on a similar topic (filtering lines by filetype from the
output of "the files") made me think of this thread again.
I tried Alex's test again and also included both
filter lines of tVar without "a*"
and
filter lines of tVar without "a*" into tVar2
The first variation completed in .004 seconds and the second in .005
seconds, both faster than any other method. Can't speak to memory usage.
This thread started of on the subject of repeat loops but it seems that the
filter command is the way to go provided that you can express the required
data conditions with it. The recent addition of using regex with filter
makes that more likely. Personally, I'm always drawn to solutions with
less lines of code, assuming performance is at least comparable.
Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
More information about the use-livecode
mailing list