Unless you're working with memory mapped files -- which are a reflection of an external (os) mechanism -- named nouns in J are copy on write.
For example: a=:p:i.4 b=:a a=:a 1}~ 9 a 2 9 5 7 b 2 3 5 7 Thanks, -- Raul On Wed, Mar 4, 2020 at 1:14 PM Hauke Rehr <[email protected]> wrote: > > talking about copying: I don’t remember having read about > whether J is copy-on-write or when copying will take place > is there a defined set of verbs that does copying or does > that take place at a different level? > > Am 04.03.20 um 15:29 schrieb Raul Miller: > > Yes. > > > > The general case, implementated in J, would be more like > > > >> (, <@u)^:n > > > > But, also, if side effects are involved, then computational efficiency of > > the ^: implementation will often not be the key priority. > > > > And... copying is one of the faster operations that computers support. Not > > the fastest, but still pretty fast. > > > > Anyways, ... if the situation is complicated enough that you might need > > unanticipated copy operations, it's probably (not guaranteed, but still > > likely) complicated enough that copying will be faster than recomputing. > > > > Thanks, > > > > -- > ---------------------- > mail written using NEO > neo-layout.org > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
