summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 9557ac3..063ae86 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -321,6 +321,8 @@ manymult n = foldl1' (<>) (map rot2 angles) where
321 where c = cos a 321 where c = cos a
322 s = sin a 322 s = sin a
323 323
324multb n = foldl1' (<>) (replicate (10^6) (ident n :: Matrix Double))
325
324-------------------------------- 326--------------------------------
325 327
326multBench = do 328multBench = do
@@ -328,6 +330,15 @@ multBench = do
328 let b = ident 2000 :: Matrix Double 330 let b = ident 2000 :: Matrix Double
329 a `seq` b `seq` putStrLn "" 331 a `seq` b `seq` putStrLn ""
330 time "product of 1M different 3x3 matrices" (manymult (10^6)) 332 time "product of 1M different 3x3 matrices" (manymult (10^6))
333 putStrLn ""
334 time "product of 1M constant 1x1 matrices" (multb 1)
335 time "product of 1M constant 3x3 matrices" (multb 3)
336 --time "product of 1M constant 5x5 matrices" (multb 5)
337 time "product of 1M const. 10x10 matrices" (multb 10)
338 --time "product of 1M const. 15x15 matrices" (multb 15)
339 time "product of 1M const. 20x20 matrices" (multb 20)
340 --time "product of 1M const. 25x25 matrices" (multb 25)
341 putStrLn ""
331 time "product (1000 x 1000)<>(1000 x 1000)" (a<>a) 342 time "product (1000 x 1000)<>(1000 x 1000)" (a<>a)
332 time "product (2000 x 2000)<>(2000 x 2000)" (b<>b) 343 time "product (2000 x 2000)<>(2000 x 2000)" (b<>b)
333 344