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
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
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
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
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,
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