Skip to content

Commit 434cab1

Browse files
committed
Formatting
1 parent 24e1359 commit 434cab1

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

benchmarks/FineGrained.hs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
module Main where
99

10-
import Data.Bifunctor (second)
1110
import Control.DeepSeq (NFData)
1211
import Control.Monad (replicateM)
12+
import Data.Bifunctor (second)
1313
import Data.Bits (testBit)
1414
import Data.HashMap.Strict (HashMap)
1515
import qualified Data.HashMap.Strict as HM
@@ -65,16 +65,14 @@ bInsert :: Benchmark
6565
bInsert =
6666
bgroup
6767
"insert"
68-
[ bgroup "presentKey" bInsertPresentKey,
68+
[ bgroup
69+
"presentKey"
70+
[ bgroup "sameValue" bInsertPresentKeySameValue,
71+
bgroup "differentValue" bInsertPresentKeyDifferentValue
72+
],
6973
bgroup "absentKey" bInsertAbsentKey
7074
]
7175

72-
bInsertPresentKey :: [Benchmark]
73-
bInsertPresentKey =
74-
[ bgroup "sameValue" bInsertPresentKeySameValue
75-
, bgroup "differentValue" bInsertPresentKeyDifferentValue
76-
]
77-
7876
bInsertPresentKeySameValue :: [Benchmark]
7977
bInsertPresentKeySameValue =
8078
[ bgroup'WithSizes sizes "Bytes" setupBytes b,
@@ -103,7 +101,7 @@ bInsertPresentKeyDifferentValue =
103101
b s =
104102
bench (show s)
105103
. whnf (\(m, kvs) -> foldl' (\() (k, v) -> HM.insert k v m `seq` ()) () kvs)
106-
toKVs = take 100 . Data.List.cycle . map (second (+1)) . HM.toList
104+
toKVs = take 100 . Data.List.cycle . map (second (+ 1)) . HM.toList
107105
setupBytes size gen = do
108106
m <- genBytesMap size gen
109107
return (m, toKVs m)

0 commit comments

Comments
 (0)