[Jprogramming] One-based indices
Jimmy Gauvin
jimmy.gauvin at gmail.com
Wed Jan 2 03:01:04 UTC 2019
Performance numbers :
ts '}. at i.&>: 100000000'
0.58105 2.14749e9
ts '1+ i.100000000'
0.614825 2.14749e9
On Tue, Jan 1, 2019 at 9:59 PM Jimmy Gauvin <jimmy.gauvin at gmail.com> wrote:
>
> Hi,
>
> all the additions in 1 + i. 5 (or >:5) seem wasteful, I prefer generating
one more and dropping the first :
>
> }. i. >:5
> 1 2 3 4 5
>
> but there might be some special code because both appear to have similar
performance :
>
>
>
> On Tue, Jan 1, 2019 at 1:13 PM 'Pascal Jasmin' via Programming <
programming at jsoftware.com> wrote
> >
> > iota =: i. : (+ i.)
> >
> > 1 iota 51 2 3 4 5
> >
> > iota is 0 based if monadic, right argument based if dyadic.
> >
> > if there were more "ascii op codes" an ideal design for every verb
would have the monadic version be a "default argument" version of a dyadic
form.
> >
More information about the Programming
mailing list