Skips special data does not justify his general conclusion: "The brute force solution is the fastest by several orders of magnitude. The closed form solution is slow AND uses lots of space". Other data give other conclusions.
closed [: (,. (3r4 * <:)) 5&^ (10) 6!:2'closed 5' 1.82306e_5 (10) 6!:2'((0 3+*&5)^:5)1 0x' 8.04365e_5 (10) 6!:2'closed 50' 3.68924e_5 (10) 6!:2'((0 3+*&5)^:50)1 0x' 0.000332709 (10) 6!:2'closed 500' 2.99943e_5 (10) 6!:2'((0 3+*&5)^:500)1 0x' 0.00487965 It cannot be concluded that 'closed' is generally slower than the brute force computation. In the above cases 'closed' is faster. - Bo >________________________________ > Fra: Boyko Bantchev <boyk...@gmail.com> >Til: programm...@jsoftware.com >Sendt: 18:21 søndag den 23. december 2012 >Emne: Re: [Jprogramming] arithmetic sequence > >On 23 December 2012 18:06, Bo Jacoby <bojac...@yahoo.dk> wrote: >> Skip's conclusion did not follow from his data in the first place. > >His conclusion is based on his data for producing a 5000-items long >sequence. Not only is it valid but in fact it holds for *all* lengths >where extended numbers are needed, i.e. practically always. >---------------------------------------------------------------------- >For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm