[Jprogramming] Special code for dyad (, ,) ?

Henry Rich HenryHRich at nc.rr.com
Wed Jan 3 09:53:18 HKT 2007


Looks better if it's an in-place append:

   x=: 1e5 ?@$ 100
   y0=: 100 1000 ?@$ 100
   y1=: ,y0
   ts=: 6!:2 , 7!:2@]
   ts 'x =: x,,y0'
0.00282366 1.5735e6
   ts 'x =: x,y1'
0.000432159 640 

Henry Rich

> -----Original Message-----
> From: programming-bounces at jsoftware.com 
> [mailto:programming-bounces at jsoftware.com] On Behalf Of Roger Hui
> Sent: Tuesday, January 02, 2007 8:36 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Special code for dyad (, ,) ?
> 
> The prospective special code will have a hard time
> making the "factor of 2" threshold.
> 
>    x=: 1e5 ?@$ 100
>    y0=: 100 1000 ?@$ 100
>    y1=: ,y0
> 
>    ts=: 6!:2 , 7!:2@]
>    ts 'x,,y0'
> 0.00322862 1.5735e6
>    ts 'x,y1'
> 0.0022081 1.04922e6
> 
> 
> 
> ----- Original Message -----
> From: Henry Rich <HenryHRich at nc.rr.com>
> Date: Tuesday, January 2, 2007 5:26 pm
> Subject: [Jprogramming] Special code for dyad (, ,) ?
> 
> > The docs show special code for things like ($ ,) and
> > ({. ,) etc, but not for (, ,)  .
> > 
> > I am drawing some long vector lists and I hate to see the extra copy
> > when I do something like
> > 
> > displaylist =: displaylist , , long_2D_vector_list
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm



More information about the Programming mailing list