On 20 October 2011 22:16, thomas burt thedwa...@gmail.com wrote:
Perhaps I will try and force `stuffToDo` not to leave any partially
evaluated thunks behind and compare the cost then.
What happens when you switch to a strict StateT?
Bas
___
Sorry, thought I had replied to this with my result!
I added `seq` and $! inside `stuffToDo` to ensure that there weren't any
thunks left around after it was called.
The measured times were only a few hundredths of a second apart after that.
So, apparently even with a strict StateT, partially
On Saturday 22 October 2011, 23:07:44, thomas burt wrote:
Sorry, thought I had replied to this with my result!
I added `seq` and $! inside `stuffToDo` to ensure that there weren't any
thunks left around after it was called.
The measured times were only a few hundredths of a second apart
On 11-10-20 01:38 PM, thomas burt wrote:
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
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
On Thu, Oct 20, 2011 at 10:38 AM, thomas burt thedwa...@gmail.com 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 few
hundred times?
___
Haskell-Cafe
On Thu, Oct 20, 2011 at 11:59 AM, David Barbour dmbarb...@gmail.com wrote:
On Thu, Oct 20, 2011 at 10:38 AM, thomas burt thedwa...@gmail.com 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 few