Comparing big lists

erik hansen erikhans08 at yahoo.com
Sun Apr 28 21:52:01 EDT 2002


how about a short example?
thanks, erik

--- Dave Cragg <dcragg at lacscentre.co.uk> wrote:
> It think you'll find adding stuff at the end of
> a variable extremely 
> fast using "put x after y". However, the "line
> thisLine of bigList" 
> part will get progressively slower as the value
> of thisLine 
> increases.  This is why the general  advice is
> to use "repeat for 
> each" where possible and avoid using
> incremented chunk expressions 
> which have to count through the data each time.
> However, going back 
> to the original example, if you don't expect to
> find many matches, 
> that part may not be so costly. On the other
> hand, lineOffset will 
> get called for each line, making it fairly
> expensive.
> 
> So, if possible, in large loops:
> 
> -- use "repeat for each" (or "split" as Scott
> suggested)
> -- use "put x after y"
> -- avoid using "line n of y"
> -- avoid using lineOffset


=====
erik at erikhansen.org                 http://www.erikhansen.org

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com



More information about the metacard mailing list