diff options
Diffstat (limited to 'examples/speed.hs')
-rw-r--r-- | examples/speed.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/speed.hs b/examples/speed.hs index a937f31..865e3e1 100644 --- a/examples/speed.hs +++ b/examples/speed.hs | |||
@@ -1,3 +1,23 @@ | |||
1 | {- speed tests | ||
2 | |||
3 | $ ghc --make -O speed | ||
4 | In my machine: | ||
5 | $ ./speed 5 100000 1 | ||
6 | (3><3) | ||
7 | [ -1.7877285611885504e-2, 0.0, -0.9998401885597121 | ||
8 | , 0.0, 1.0, 0.0 | ||
9 | , 0.9998401885597168, 0.0, -1.7877285611891697e-2 ] | ||
10 | 0.29 CPU seconds | ||
11 | |||
12 | GNU-Octave: | ||
13 | ./speed.m | ||
14 | -0.017877255967426 0.000000000000000 -0.999840189089781 | ||
15 | 0.000000000000000 1.000000000000000 0.000000000000000 | ||
16 | 0.999840189089763 0.000000000000000 -0.017877255967417 | ||
17 | 9.69 seconds | ||
18 | |||
19 | -} | ||
20 | |||
1 | import Numeric.LinearAlgebra | 21 | import Numeric.LinearAlgebra |
2 | import System | 22 | import System |
3 | import Data.List(foldl1') | 23 | import Data.List(foldl1') |