From b8b9e8a91b51e6689a071dbc05f3da857c762e0d Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Thu, 14 Jan 2010 13:17:44 +0000 Subject: dispf, disps --- lib/Numeric/LinearAlgebra/Tests.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/Numeric/LinearAlgebra/Tests.hs') 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 where c = cos a s = sin a +multb n = foldl1' (<>) (replicate (10^6) (ident n :: Matrix Double)) + -------------------------------- multBench = do @@ -328,6 +330,15 @@ multBench = do let b = ident 2000 :: Matrix Double a `seq` b `seq` putStrLn "" time "product of 1M different 3x3 matrices" (manymult (10^6)) + putStrLn "" + time "product of 1M constant 1x1 matrices" (multb 1) + time "product of 1M constant 3x3 matrices" (multb 3) + --time "product of 1M constant 5x5 matrices" (multb 5) + time "product of 1M const. 10x10 matrices" (multb 10) + --time "product of 1M const. 15x15 matrices" (multb 15) + time "product of 1M const. 20x20 matrices" (multb 20) + --time "product of 1M const. 25x25 matrices" (multb 25) + putStrLn "" time "product (1000 x 1000)<>(1000 x 1000)" (a<>a) time "product (2000 x 2000)<>(2000 x 2000)" (b<>b) -- cgit v1.2.3