Has Anyone Got A Directory \\\"Walker\\\" Available
brian at milby7.com
Mon May 7 15:53:32 EDT 2018
I think we may be in the territory of pre-mature optimization. There is
going to be a bit more overhead creating a copy-on-write object than a
pass-by-reference object, but the real gains (over the old way) are going
to be seen with objects that are “large”. If you run a profiler and need to
improve a section of code, then this would be something to have in the
toolbox. It probably isn’t a good practice to use everywhere since then you
have to be careful about changing the value of a parameter.
It would be interesting to see that same piece of code run before the
change. When did copy on write get introduced?
On Mon, May 7, 2018 at 2:20 PM Richard Gaskin via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Mark Wieder wrote:
> > On 05/06/2018 02:42 PM, Richard Gaskin via use-livecode wrote:
> >> Did copy-on-write get changed in v9, or is the scope of its effects
> >> just more limited than I had understood it to be?
> > I'm still at the point of not trusting copy-on-write yet, but I think
> > you're misinterpreting your results. If I'm understanding the way in
> > which LC has implemented copy-on-write, then whether or not you use
> > references in parameters, the "return p-1" code will have to make a
> > copy on the stack to return a value - you can't just return a
> > reference. So all you're changing by removing the "@" is one level of
> > copying.
> That makes sense. Thanks.
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> Ambassador at FourthWorld.com http://www.FourthWorld.com
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode