[Haskell-cafe] IORef vs TVar performance: 6 seconds versus 4 minutes

Don Stewart dons at galois.com
Mon Dec 29 10:39:59 EST 2008


jsnow:
> This seems like it ought to be pretty innocuous, unless the whole list 
> is getting evaluated each time I cons a new entry, or if readTVar or 
> writeTVar are much more expensive than they appear.
> 

For general details on the complexity of IORef, MVar or TVar structures,
see

    Comparing the performance of concurrent linked-list implementations
    in Haskell (Martin Sulzmann, Edmund S. L. Lam, Simon Marlow)
    Submitted to DAMP'09, October 2008

    http://www.haskell.org/~simonmar/papers/concurrent-data.pdf



More information about the Haskell-Cafe mailing list