That is interesting, I was independently testing the same expression ;A ;
B ; C vs A , B , C with different sample nouns and it seems leaner and
meaner:
st=. (, */&.:>@:(1 2&{))@:(] ; 7!:2@:] ; 6!:2)
'A B C'=. i.3 1000000
111 st&>'A , B , C' ; ';A ; B ; C'
┌──────────┬────────┬─────────┬─────────┐
│A , B , C │50333184│0.0335228│1.68731e6│
├──────────┼────────┼─────────┼─────────┤
│;A ; B ; C│33556608│0.0198092│664728 │
└──────────┴────────┴─────────┴─────────┘
(A , B , C) -: i.3000000
1
(;A ; B ; C) -: i.3000000
1
Using your sample nouns it is not as dominant but remains dominant
nevertheless:
A=:?~1000000
B=:0.1+?~1000000
C=:?~1000000
111 st&>'A , B , C' ; ';A ; B ; C'
┌──────────┬────────┬─────────┬─────────┐
│A , B , C │67110400│0.0496758│3.33377e6│
├──────────┼────────┼─────────┼─────────┤
│;A ; B ; C│50333824│0.0360027│1.81216e6│
└──────────┴────────┴─────────┴─────────┘
(A , B , C) -: (;A ; B ; C)
1
JVERSION
Installer: j602a_win.exe
Engine: j803/2014-10-19-11:11:11
Library: 6.02.023
On Sun, Jan 31, 2016 at 7:05 PM, Raul Miller <[email protected]> wrote:
> Oops, I meant:
>
> timespacex ';a;b;c'
> 0.012332 5.03338e7
> timespacex ';a;b;c'
> 0.011768 5.03338e7
> (;a;b;c)-:a,b,c
> 1
>
> Efficiency characteristics are the same, result (the most important
> part) is different.
>
> --
> Raul
>
> On Sun, Jan 31, 2016 at 7:04 PM, Raul Miller <[email protected]>
> wrote:
> > If I define:
> > a=:?~1000000
> > b=:0.1+?~1000000
> > c=:?~1000000
> >
> > I get:
> > timespacex 'a,b,c'
> > 0.016585 6.71104e7
> > timespacex '>a;b;c'
> > 0.012863 5.0334e7
> > timespacex '>a;b;c'
> > 0.011867 5.0334e7
> > timespacex 'a,b,c'
> > 0.015703 6.71104e7
> >
> > So it looks like >a;b;c is slightly more efficient than a,b,c, but
> > it's nowhere close to a factor of 2, so I think I'd ignore this issue
> > in most contexts.
> >
> > --
> > Raul
> >
> >
> > On Sun, Jan 31, 2016 at 5:21 PM, Henry Rich <[email protected]>
> wrote:
> >> You have 3 large lists a, b, c (1000000 atoms each). You want to join
> them
> >> into one long list. What is the best way to do this?
> >>
> >> Henry Rich
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm