On Sat, Sep 25, 2010 at 11:47 AM, Viktor Cerovski
<[email protected]> wrote:
> Some improvement (about 10% in speed) of eq1,2,3
> is possible if we notice:
>
>   f/ === {:@(f/\) === {.@(f/\.)
>
> so there is no need to compute the sum after computing the partial sum,
> and we get:
>
>  eq2a =: I.@({:@] = +:@] - [) +/\

But this is still slower than eq0 on my system:

   d=: _10+?1e7#21
   (eq2a-:eq0) d
1
   ts=:6!:2,7!:2
   ts 'eq0 d'
0.187684 2.85214e8
   ts 'eq2a d'
0.21509 4.02655e8

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to