I used the "for each line" in a recent project that evaluates 500,000 lines and takes just a couple of seconds to complete. It is VERY fast!
SKIP On Tue, Jun 17, 2014 at 1:11 PM, <la...@significantplanet.org> wrote: > Thanks to Mark and jbv for the good advice. > I ended up using the "for each line..." since that was easy and fast > Larry > > ----- Original Message ----- From: <j...@souslelogo.com> > To: "How to use LiveCode" <use-livecode@lists.runrev.com> > Sent: Tuesday, June 17, 2014 8:38 AM > Subject: Re: which is faster for searching? > > > > Larry, >> >> "repeat for each line..." is definitely faster >> >> and >> >> repeat for each line j in myVar >> if j contains myText then >> end if >> end repeat >> >> should be pretty fast. >> >> jbv >> >> >> 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@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >>> >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > 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 > _______________________________________________ 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