Further evidence for Raul's last point: f0 =: ;@:(<@i."0) f0a=: ; @: (i.&.>) f1 =: (#&1"0 #&, i."0) f2 =: i.@(+/) - ] # +/[EMAIL PROTECTED]:@(0&,)
x=: 1e4 [EMAIL PROTECTED] 200 (f0 -: f0a) x 1 (f0 -: f1) x 1 (f0 -: f2) x 1 ts=: 6!:2 , 7!:[EMAIL PROTECTED] ts 'f0 x' 0.0474203 1.06316e7 ts 'f0a x' 0.0341342 1.13781e7 ts 'f1 x' 0.139537 2.51666e7 ts 'f2 x' 0.0691909 1.26492e7 ----- Original Message ----- From: Roger Hui <[EMAIL PROTECTED]> Date: Thursday, November 9, 2006 11:13 am Subject: Re: RE: [Jprogramming] How to avoid fills without boxing? > (i.+/x) - x#+/\}:0,x=: i.5 > 0 0 1 0 1 2 0 1 2 3 > (i.+/x) - x#+/\}:0,x=: 3 1 4 1 5 9 > 0 1 2 0 0 1 2 3 0 0 1 2 3 4 0 1 2 3 4 5 6 7 8 > > > > ----- Original Message ----- > From: "Miller, Raul D" <[EMAIL PROTECTED]> > Date: Thursday, November 9, 2006 11:09 am > Subject: RE: [Jprogramming] How to avoid fills without boxing? > > > R.E. Boss wrote: > > > How do I realize without boxing (performance reasons) > > > ;@:(<@i."0) i.5 > > > 0 0 1 0 1 2 0 1 2 3 > > > > Alternate formulations, which do not use boxing, are > > possible. For example: > > (#&1"0 #&, i."0) i.5 > > 0 0 1 0 1 2 0 1 2 3 > > > > However, "without boxing" need not mean "better > > performance". (And does not, in this case.) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
