diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-06-14 13:14:24 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-06-14 13:14:24 +0200 |
commit | 517dfdbf884ef2b3f3f3d365294a6a714ba7ff9d (patch) | |
tree | 52c0a64c454c3d23b293023602b0093d5a59b658 /packages | |
parent | 717c680a4b65a2226b0dd6fc13f7c63e7bc0431d (diff) |
benchmark luPacked'
Diffstat (limited to 'packages')
-rw-r--r-- | packages/tests/src/Numeric/LinearAlgebra/Tests.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs index 4cfa5cb..ffa45e7 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs | |||
@@ -613,6 +613,7 @@ runBenchmarks = do | |||
613 | cholBench | 613 | cholBench |
614 | svdBench | 614 | svdBench |
615 | eigBench | 615 | eigBench |
616 | luBench | ||
616 | putStrLn "" | 617 | putStrLn "" |
617 | 618 | ||
618 | -------------------------------- | 619 | -------------------------------- |
@@ -762,3 +763,20 @@ cholBench = do | |||
762 | cholBenchN 300 | 763 | cholBenchN 300 |
763 | -- cholBenchN 150 | 764 | -- cholBenchN 150 |
764 | -- cholBenchN 50 | 765 | -- cholBenchN 50 |
766 | |||
767 | -------------------------------------------------------------------------------- | ||
768 | |||
769 | luBenchN f n x msg = do | ||
770 | let m = diagRect 1 (fromList (replicate n x)) n n | ||
771 | m `seq` putStr "" | ||
772 | time (msg ++ " "++ show n) (f m) | ||
773 | |||
774 | luBench = do | ||
775 | luBenchN luPacked 1000 (5::R) "luPacked Double " | ||
776 | luBenchN luPacked' 1000 (5::R) "luPacked' Double " | ||
777 | luBenchN luPacked' 1000 (5::Mod 9973 I) "luPacked' I mod 9973" | ||
778 | luBenchN luPacked' 1000 (5::Mod 9973 Z) "luPacked' Z mod 9973" | ||
779 | |||
780 | |||
781 | |||
782 | |||