[Git][ghc/ghc][master] Reduce AtomicModifyIORef increment count
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Mar 1 02:26:57 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
960c8d47 by Teo Camarasu at 2024-02-29T21:26:20-05:00
Reduce AtomicModifyIORef increment count
This test leads to a lot of contention when N>2 and becomes very slow. Let's reduce the amount of work we do to compensate. Resolves #24490
- - - - -
2 changed files:
- libraries/base/tests/AtomicModifyIORef.hs
- libraries/base/tests/AtomicModifyIORef.stdout
Changes:
=====================================
libraries/base/tests/AtomicModifyIORef.hs
=====================================
@@ -5,7 +5,7 @@ import Data.IORef
main :: IO ()
main = do
let nThreads = 10
- nIncrs = 10000000
+ nIncrs = 10000
ref <- newIORef (42 :: Int)
dones <- replicateM nThreads $ do
=====================================
libraries/base/tests/AtomicModifyIORef.stdout
=====================================
@@ -8,4 +8,4 @@
.
.
.
-100000042
+100042
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/960c8d47f064644617a605b1225a18e9350be995
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/960c8d47f064644617a605b1225a18e9350be995
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240229/ab78d7ec/attachment.html>
More information about the ghc-commits
mailing list