"Miller, Raul D" <[EMAIL PROTECTED]> wrote: Re: How to do that in J? > Mark D. Niemiec wrote: > > memory =: register address } memory > > do not actually copy the entire memory array > > Perhaps. > > I'm seeing well over an order of magnitude > difference in timing for operations matching > the above pattern. I don't really know what > is going on.
A few things can force a copy. For one, if the pattern is not recognized as y =: x m } y (or =.) In particular, while x and m can be sophisticated expressions, both occurrances of y must be unadorned. Another is if a type conversion is required, such as amending an integer array with a real value. A third could happen if the two y's here are in different scopes (this can happen with =. if a global y exists but a local one does not exist yet - the first such amend ought to create a local copy). -- Mark D. Niemiec <[EMAIL PROTECTED]> ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
