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

2011-01-29 Thread Neil Brown
Hi, First of all, don't be fooled by the alloc statistic. That is not 3GB memory residency, that's 3GB allocation, which was interspersed with lots of garbage collections, in the same way that measuring how many times malloc was called in a C program doesn't necessarily indicate memory

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

2011-01-29 Thread Bas van Dijk
On 29 January 2011 18:22, Neil Brown nc...@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