[Haskell-cafe] 3GB allocation, 75% CPU usage from a callback function

Bas van Dijk v.dijk.bas at gmail.com
Sat Jan 29 19:09:02 CET 2011


On 29 January 2011 18:22, Neil Brown <nccb2 at kent.ac.uk> wrote:
> ...you were also using an extra readIORef as part of the modifyIORef that you didn't need...

Indeed and writing the t+1 strictly to the ioref also makes it
slightly faster (~2%):

writeIORef ioref $! t+1

Bas



More information about the Haskell-Cafe mailing list