We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 092633e commit 3567a98Copy full SHA for 3567a98
benchmarks/FineGrained.hs
@@ -225,16 +225,11 @@ bSetFromList :: Benchmark
225
bSetFromList =
226
bgroup
227
"fromList"
228
- [ bg "Bytes" setupBytes,
229
- bg "Int" setupInts
+ [ bgroup' "Bytes" (\s gen -> genNBytes s bytesLength gen) b,
+ bgroup' "Int" genInts b
230
]
231
where
232
- bg name e = bgroup name (b e)
233
- b e = [env' s e run | s <- defaultSizes]
234
- run :: (Hashable a) => [a] -> Benchmarkable
235
- run = whnf Data.HashSet.fromList
236
- setupBytes s gen = genNBytes s bytesLength gen
237
- setupInts = genInts
+ b size = bench (show size) . whnf Data.HashSet.fromList
238
239
keysToMap :: (Hashable k) => [k] -> HashMap k Int
240
keysToMap = HM.fromList . map (,1)
0 commit comments