It is faster to use version 1 because accessing the
lines in a variable is faster than accessing lines in
a field.

JB


> On Jan 12, 2019, at 8:01 AM, David Epstein via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I've done a little bit of speed testing showing extremely slight differences, 
> but wonder if anyone who understands the "engine" can advise on this:
> 
> Is there a difference between these two approaches?
> 
> (1) put fld 1 into txt; repeat for each line k in txt; etc.
> 
> and
> (2) repeat for each line k in fld 1; etc.
> 
> For no very good reason, I tend to do (1), but have begun to wonder:  for a 
> very lengthy field 1, does my writing to a variable use up more RAM, and so 
> perhaps injure performance?  Or is the engine in effect writing to a variable 
> either way?  Is a variable read more quickly than a field?  
> 
> Many thanks.
> David Epstein
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to