J. Landman Gay
jacque at hyperactivesw.com
Thu Jun 23 13:39:38 CDT 2011
On 6/23/11 12:23 PM, Pete wrote:
> Now I can add "symmetric difference" to my extremely small vocabulary of set
> theory terms!
Yeah, I'd never heard of it either. Now I can sound smart. :)
> Largely academic at this point but there is a variation to the
> array solution that Jacque and I offered which does it all in one repeat
> put tlist1& cr& tlist2 into tlist3
> repeat with x=1 to the number of lines in tlist3
> if line x of tlist3 is among the keys of tarray then
> delete variable tarray[line x of tlist3]
> put true into tarray[line x of tlist3]
> end if
> end repeat
Use "repeat for each" instead of a counter. I don't have the benchmarks,
but it is somewhere between a gazillion and a bazillion times faster.
I've become a little compulsive about it, since except for the very
shortest of lists, the speed difference is so great.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode