
#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: | -------------------------------------+------------------------------------- Comment (by dfeuer): The big difference I see between the original and hvr's version is that the original installs a thunk in the `IORef` and then immediately forces it, whereas hvr's version forces it, and then installs it in the `IORef`. I don't think this difference can be observed, but I'm no expert. I think parcs's modification is just a milder step on the way to hvr's, which looks likely to be the simplest/best, but that would take benchmarking. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8345#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler