sp=: smoutput @ ": @ (7!:0)
sp ''
13163136
x=: i.1e7
sp ''
80272000
sp '' [ (3 : '0 [ sp $0 [ y') x [ sp ''
80272640
80276352
80275264
No, doesn't look like it makes a copy.
On Sat, Apr 7, 2012 at 3:59 PM, Graham Parkhouse <
graham.parkhouse@...> wrote:
> Does a verb in J automatically make a local copy of its arguments?
>
> I have a very large array which I would like to pass as an argument, but
> maybe I shouldn't if that would cause duplication of the array. The array
> is
> not going to be amended by the function, so in principle a copy is not
> necessary.
>
> Thanks in anticipation.
>
> Graham
>
> ----------------------------------------------------------------------
> For information about J forums see
http://www.jsoftware.com/forums.htm>
----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm