Optimizations for mutable structures?

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Wed Dec 7 08:37:35 EST 2005

Jan-Willem Maessen <jmaessen at alum.mit.edu> writes:

>    - Fetch elimination for imperative reads:
>      writeIORef r e >> acts >> readIORef r
>  === writeIORef r e >> acts >> return e

This transformation is valid only on single-threaded systems.
If there is any possibility of an IORef being shared across threads,
you are out of luck.


More information about the Glasgow-haskell-users mailing list