Pretty sure a direct map here is quicker
1 files changed, 2 insertions(+), 2 deletions(-)

M arithmetic-matrix-fn.sml
M arithmetic-matrix-fn.sml +2 -2
@@ 70,10 70,10 @@ functor ArithmeticMatrixFn (ARG : ARITHM
                        fn ix => ARG.OP./ (sub (m1, ix), sub (m2, ix)))
 
     fun increment (m, e) =
-        tabulate (order m, size m, fn ix => ARG.OP.+ (sub (m, ix), e))
+        map (fn me => ARG.OP.+ (me, e)) m
 
     fun scale (m, e) =
-        tabulate (order m, size m, fn ix => ARG.OP.* (sub (m, ix), e))
+        map (fn me => ARG.OP.* (me, e)) m
 
     fun density m =
         let open Int