fastes way to search an array?
mark at livecode.com
Thu Apr 23 10:35:13 CEST 2015
On 2015-04-23 02:15, Richard Gaskin wrote:
> In fact, given that SearchArray1 includes the extra overhead of
> extracting the keys and creating a text list from them, if it were
> faster I'd call it a bug.
I think you may have your SearchArray* functions round the wrong way.
SearchArray1 is 'direct key' (it uses repeat for each key)
SearchArray2 is 'key list' (it uses 'the keys' and repeat for each line)
The results are what I would expect - 'direct key' is faster than 'key
list' for precisely the reason you state above :)
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode