From f7b0e9d3632048c0fcda5480a798230105922d62 Mon Sep 17 00:00:00 2001 From: Olle Fredriksson Date: Mon, 6 Apr 2020 20:53:56 +0200 Subject: [PATCH] Use half the available capabilities This is faster for me, for some weird reason. --- src/Driver.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Driver.hs b/src/Driver.hs index f24bc74e..6024ca81 100644 --- a/src/Driver.hs +++ b/src/Driver.hs @@ -317,7 +317,7 @@ pooledForConcurrentlyIO_ as f = do _ <- f a go ) - replicateConcurrently_ processCount go + replicateConcurrently_ ((processCount + 1) `div` 2) go pooledForConcurrentlyIO :: Traversable t @@ -344,7 +344,7 @@ pooledForConcurrentlyIO as f = do atomicWriteIORef ref result go ) - replicateConcurrently_ processCount go + replicateConcurrently_ ((processCount + 1) `div` 2) go forM jobs $ \(_, ref) -> readIORef ref