Re: Re: [Haskell-cafe] "computational time" always 0.0 in this example...

2006-12-08 Thread Lennart
The "time $ evaluate (sum (doTest wordList2 wordList2))" works fine for me... ...and the ":set +s" is gorgeous as well! Thanks for the help! Lennart Lemmih wrote: On 12/7/06, Lennart <[EMAIL PROTECTED]> wrote: Hi, with the following code, I want to measure the time being needed to execute t

Re: [Haskell-cafe] "computational time" always 0.0 in this example...

2006-12-07 Thread Lemmih
On 12/7/06, Lennart <[EMAIL PROTECTED]> wrote: Hi, with the following code, I want to measure the time being needed to execute the algorithm. But the result is always 0.0. import Char (toLower) import Maybe import List ( delete, sort, intersect ) import System.CPUTime import Control.Exception

Re: [Haskell-cafe] "computational time" always 0.0 in this example...

2006-12-07 Thread Bulat Ziganshin
Hello Lennart, Thursday, December 7, 2006, 4:59:57 PM, you wrote: > time $ product [1..1000] `seq` return () > instead of > time $ doTest wordList2 wordList2 `seq` return () > works fine. because 'product' returns just one value. use the following: time $ (return $! last (doTest wordList2 wordL

Re: [Haskell-cafe] "computational time" always 0.0 in this example...

2006-12-07 Thread Lemmih
On 12/7/06, Lennart <[EMAIL PROTECTED]> wrote: Hi, with the following code, I want to measure the time being needed to execute the algorithm. But the result is always 0.0. import Char (toLower) import Maybe import List ( delete, sort, intersect ) import System.CPUTime import Control.Exception

Re: [Haskell-cafe] "computational time" always 0.0 in this example...

2006-12-07 Thread Philippa Cowderoy
On Thu, 7 Dec 2006, Lennart wrote: > Hi, > > with the following code, I want to measure the time being needed to execute > the algorithm. But the result is always 0.0. > You need to do something to force the result of a, or it'll never actually get evaluated. Depending on the type in question,

[Haskell-cafe] "computational time" always 0.0 in this example...

2006-12-07 Thread Lennart
Hi, with the following code, I want to measure the time being needed to execute the algorithm. But the result is always 0.0. import Char (toLower) import Maybe import List ( delete, sort, intersect ) import System.CPUTime import Control.Exception import Debug.Trace fromInt = fromIntegral wo