[Jprogramming] Joining lists
Raul Miller
rauldmiller at gmail.com
Mon Feb 1 00:05:39 UTC 2016
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 <rauldmiller at gmail.com> 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 <henryhrich at gmail.com> 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
More information about the Programming
mailing list