There should be a "unique" option on sort . . .

Peter Haworth pete at lcsql.com
Mon Jan 6 15:36:20 EST 2014


On Mon, Jan 6, 2014 at 11:41 AM, Richard Gaskin
<ambassador at fourthworld.com>wrote:

> So when case sensitivity will do what you need, the result is pretty
> impressive - about half the time required for the other fastest option:
>
> 10 iterations on 10000 lines of 5 or fewer chars:
> "Add 1" Array: 58 ms (5.8 ms per iteration)
> "Split" Array: 24 ms (2.4 ms per iteration)
> Results match - Each list has 997 lines
>

Thanks Richard and sorry for mixing up split and combine, I always find
those terms not particularly reflective of what they do.

Your tests do seem to bear out that a built in command is faster than a
scripted solution, at least for this case.

Not sure what to say about the case sensitivity issue.  I hadn't thought
about it but now you mention it, I don't think I'd expect split to be case
sensitive.  Would be nice if it observed the caseSensitive setting I guess
but I think I'd regard that as an enhancement rather than a bug.

I think some of the other solutions would need to set caseSensitive to true
if necessary.

Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list