fastes way to search an array?

Peter Haworth pete at
Wed Apr 22 19:22:04 EDT 2015

Out of interest, I added a test which used combine and filter.  It took
around 3 times longer than the other two tests.

lcSQL Software <>
Home of lcStackBrowser <> and
SQLiteAdmin <>

On Wed, Apr 22, 2015 at 3:51 PM, Richard Gaskin <ambassador at>

> Mike Bonner wrote:
>  I wonder how easy it would be to add an option to arrayencode.  It already
>> flattens an array nicely, but not in a searchable way. It would be cool to
>> add an optional argument that still flattens, but doesn't encode.  The
>> code
>> to traverse the array is already there, with an option to leave the data
>> and keys readable, it would then make an interesting batch of searchable
>> text. Just glancing at an encoded array, it looks relatively
>> comprehensible.
> Relatively.  Lots of binary stuff there, though - it's relatively slow for
> the engine to recompose into an array, and no doubt much slower to attempt
> to do in script.
> May not be much of a need, though, since traversing arrays with what we
> have is pretty fast - from my earlier email:
>    go url ""
>  One issue would be the unordered way arrays are stored. (making
>> arrayencoded arrays come out different despite identical data, as per the
>> dictionary page)
> That's a function of the hashing used for any associative array.  Not much
> can be done about that for strings, though there's been some talk of adding
> numerically indexed arrays for those who need only sequential integers as
> keys and need to maintain order.
> But in the meantime the sort command is pretty handy. :)
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  ____________________________________________________________________
>  Ambassador at      
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list