in reply to Re: pushing multidimensional arrays
in thread pushing multidimensional arrays
The benefit of starting with the final size is there's only one big allocation. When loop-fusion arrives, the data will only go in and out of RAM once. Note the above slices don't need to specify the trailing ,:.$out = zeroes 4,100_000; $out->slice('0:2')->inplace->sequence; $out->slice('3') .= (($out->slice('0') ** 2) + ($out->slice('1') ** 2) +) ** 0.5;
|
|---|