Speed testing: Fastest search method

Geoff Canyon gcanyon at gmail.com
Mon Sep 1 20:58:59 EDT 2014


On Sun, Aug 31, 2014 at 4:04 PM, Alex Tweedly <alex at tweedly.net> wrote:

> I also added  method4, which tries to get the best of both worlds. It
> restricts the additional memory usage (by building up a second variable,
> but removing sections of the input variable at the same time), and also
> does relatively few deletions (and hence few data copies).
>

I'd question whether the memory usage would actually go down while the
routine is running because you delete something. I don't *know* that it
won't work, but it seems possible that you're actually (at least with the
first delete) increasing the memory usage to double because of the
(relatively) small delete from a large variable.

All justifications aside, I'd use method 3 all the time unless something
broke. ;-)



More information about the use-livecode mailing list