I was seeing factor of 2 variation in timing:

   timespacex '0{::([ ((,{.);]) {:@[ f"1 }.@])&>/^:(<:@#`(,:@{.;])) !/~i.10'
0.000502896 22400
   timespacex '{."2 ({. f"1 }.)^:(i.@#) !/~i.10'
0.000670315 29696
   timespacex '{."2 ({. f"1 }.)^:(i.@#) !/~i.10'
0.00038519 29696
   timespacex '{."2 ({. f"1 }.)^:(i.@#) !/~i.10'
0.000499689 29696
   timespacex '0{::([ ((,{.);]) {:@[ f"1 }.@])&>/^:(<:@#`(,:@{.;])) !/~i.10'
0.000622527 22400
   timespacex '0{::([ ((,{.);]) {:@[ f"1 }.@])&>/^:(<:@#`(,:@{.;])) !/~i.10'
0.00041149 22400
   timespacex '0{::([ ((,{.);]) {:@[ f"1 }.@])&>/^:(<:@#`(,:@{.;])) !/~i.10'
0.000336119 22400
   timespacex 'orto !/~i.10'
0.000570569 15488
   timespacex 'orto !/~i.10'
0.000490067 15488
   timespacex 'orto !/~i.10'
0.000500651 15488
   timespacex 'orto !/~i.10'
0.000341251 15488
   timespacex 'orto !/~i.10'
0.000459598 15488
   timespacex 'orto !/~i.10'
0.000625413 15488
   timespacex 'orto !/~i.10'
0.000621244 15488

So anything less than a factor of 2 is roughly equivalent.

Thanks,

-- 
Raul

On Tue, Sep 16, 2014 at 7:02 AM, Aai <[email protected]> wrote:

>    timer '{."2 ({. f"1 }.)^:(i.@#) !/~i.150'
> 1.63711
>
>    timer 'P=.{.S:0 }:({. f"1 }.)&.>^:a: <!/~i.150'
> 1.44146
>
>    timer 'Q=.orto !/~i.150'
> 1.43562
>
>    P-:Q
> 1
>
> Probably still small matrices ;-)
>
>
>
>
> On 16-09-14 12:45, Raul Miller wrote:
>
>> Actually, thinking about this - the explicit version should be within a
>> factor of 2 of the performance of the power approach unless intermediate
>> results are so large you run out of memory.
>>
>> Thanks,
>>
>>
> --
> Met vriendelijke groet,
> @@i = Arie Groeneveld
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to