which is faster for searching?
larry at significantplanet.org
larry at significantplanet.org
Tue Jun 17 13:11:37 EDT 2014
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: <jbv at souslelogo.com>
To: "How to use LiveCode" <use-livecode at 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 at 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 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