My late night laziness and I got bitten by the 13 : definition doesn’t always 
work 
correctly with both x and y variables. Which I just assumed was working 
correctly.

Now when I fix the definition of matmul3 so it works correctly (as Elijah 
pointed out) the variable
representation does not incur a worrisome time penalty:

   (1+i. 4 3) ([: +/ *)"1 _ (1+i. 3 4)
 38  44  50  56
 83  98 113 128
128 152 176 200
173 206 239 272
   matmul3 =: ([: +/ *)"1 _
   (1+i. 4 3) matmul3 (1+i. 3 4)
 38  44  50  56
 83  98 113 128
128 152 176 200
173 206 239 272

   10 timex 'bmat1 ([: +/ *)"1 _ bmat2’
0.0464441
   10 timex 'bmat1 matmul3 bmat2’
0.0471224

   (bmat1 matmul3 bmat2) -: bmat1 ([: +/ *)"1 _ bmat2
1


Thanks for showing me the error 

> On Jul 19, 2022, at 5:15 AM, Elijah Stone <elro...@elronnd.net> wrote:
> 
> You are measuring two completely different things.
> 
>   10 timex'bmat1 ([: +/ *)"1 _ bmat2'
> 0.0482293
>   10 timex'bmat1 ([: +/ *"1 _) bmat2'
> 0.115583
>   (bmat1 ([: +/ *)"1 _ bmat2) -: (bmat1 ([: +/ *"1 _) bmat2)
> 0
> ----------------------------------------------------------------------
> 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