
#8345: A more efficient atomicModifyIORef' -------------------------------------+------------------------------------- Reporter: parcs | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: 7.6.3 libraries/base | Keywords: IORef Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Moderate (less Unknown/Multiple | than a day) Type of failure: Runtime | Blocked By: performance bug | Related Tickets: #5926 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by hvr): * cc: ekmett (added) Comment: Just a thought, what about: {{{#!hs atomicModifyIORef' ref f = evaluate =<< atomicModifyIORef ref (\a -> case f a of v@(!a',_) -> v) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8345#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler