which is faster for searching?

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Jun 17 10:38:59 EDT 2014


Hi Larry,

If you want to do a one-time search, possible invoked by a user action, 
3000 lines is nothing. Don't bother about speed and just use the most 
convenient way to search.

If you want to search repeatedly without user interactions between the 
searches, speed may be important. In that case, a repeat for each loop 
may be surprisingly fast. If you just want to find relevant lines and 
dispose of irrelevant lines, the filter command will probably be what 
you need, especially with its recently introduced new features.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 6/17/2014 16:22, larry at significantplanet.org wrote:
> I have a large variable containing about 3000 lines of data - each line about 100 characters.
>
> I want to search through the variable and find all the lines that contain a specified string
>
> Should I use (repeatedly) "lineoffset...", or should I use "repeat for each line..."  or maybe some other faster way?
>
> Or with only 3000 lines of data, does it even matter?
>
> TIA
> Larry
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>




More information about the use-livecode mailing list