[Haskell-cafe] runStateT execution times measurement baffling

2011-10-20 Thread thomas burt
Hello - I've been trying to measure execution time for some code I'm running with the StateT monad transformer. I have a function f :: StateT MyState IO a Now, I measure the time it takes to run an invocation of this function from beginning to end, i.e. f = do t0 <- getCurrentTime stuffToDo

Re: [Haskell-cafe] runStateT execution times measurement baffling

2011-10-20 Thread thomas burt
On Thu, Oct 20, 2011 at 11:59 AM, David Barbour wrote: > On Thu, Oct 20, 2011 at 10:38 AM, thomas burt wrote: > >> Curiously, the times reported for "outside" are about 5-8 times as long. >> > > What is the cost of putStrLn relative to performing `stuffToDo` a

Re: [Haskell-cafe] runStateT execution times measurement baffling

2011-10-22 Thread thomas burt
glemail.com> wrote: > On Saturday 22 October 2011, 13:55:36, Bas van Dijk wrote: > > On 20 October 2011 22:16, thomas burt wrote: > > > Perhaps I will try and force `stuffToDo` not to leave any partially > > > evaluated thunks behind and compare the cost then.