summaryrefslogtreecommitdiffhomepage
path: root/ExpensiveHash.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ExpensiveHash.hs')
-rw-r--r--ExpensiveHash.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs
index 6d1e6c8..93fb115 100644
--- a/ExpensiveHash.hs
+++ b/ExpensiveHash.hs
@@ -79,7 +79,8 @@ getNumCores = getmax . mapMaybe parse . lines <$> readFile "/proc/cpuinfo"
getmax [] = error "Unknown number of physical cores."
getmax l = maximum l + 1 -- add 1 because /proc/cpuinfo counts from 0
parse l
- | "core id" `isPrefixOf` l = readMaybe $ dropWhile (/= ':') l
+ | "core id" `isPrefixOf` l =
+ readMaybe $ drop 1 $ dropWhile (/= ':') l
| otherwise = Nothing
benchmarkTunables :: Tunables -> IO ()