
#8972: Investigate adding fast compare-and-swap Int type/primops -------------------------------------+------------------------------------ Reporter: tibbe | Owner: tibbe Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: 8157, 7883 -------------------------------------+------------------------------------ Comment (by rrnewton): Thanks for these benchmarks! I suspect the problem with atomicModifyIORef's poor behavior may have to do with blackholes? Tracing ghc events will perturb these workloads a bunch I guess, but maybe threadscope could still tell us something wrt blackhole events. By the way, I started peeking at the benchmark code. I don't have a good sense currently of how many cycles each of the following takes in practice: * between a forkIO and the new thread waking up on another CPU. * between two forkIO's from a parent thread waking up (gang synchrony) * delta between two threads blocked on the same MVar waking up I noticed the third method used in MainN.hs and I think this is very standard. However, I wonder if it is worth having all the test threads busy-wait on a memory location to start with a greater degree of synchrony. That way we can have them run for exactly the same time interval and maximize contention over the whole time period ;-). In any case, these benchmarks are great. I'd like to run these on a few different machines with our nightly benchmarking stuff. I read the README but I can't currently build the benchmarks because I don't have chan- split-fast -- where is that? P.S. We currently accumulate benchmark data into Google Fusion Tables (but we'd like to switch to Big Query or Cloud SQL or something). HSBencher does the upload, but it doesn't yet integrate with criterion well. It's more focused on long-running (parallel) benchmarks rather than statistically significant sampling of short runs. Still, adding support for consuming criterion reports would be great. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8972#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler