valueDiff for arrays?
Brian Milby
brian at milby7.com
Sun Aug 5 00:19:02 EDT 2018
I have not been able to locate the earlier conversation on pass by
reference vice value. I did a quick test and it took 100,000 loops to be
able to get a difference that was obvious. My test was to construct simple
functions that took 1 to 3 parameters. 3 functions used all pass by value,
3 functions used all pass by reference. Code inside the function added 1
to each parameter and returned the first. The pass by reference function
was consistently around 40ms faster than the matching value function.
Making the functions private made them slightly faster but the delta was
about the same. All of the values in this test were numeric. Those
differences seem smaller that I recall, so I will do some additional test
with arrays and strings.
More information about the use-livecode
mailing list