Skip to content

Commit 0dd488d

Browse files
committed
Add set operations-like benchmark for Data.Map.partitionKeys
1 parent a4ddb15 commit 0dd488d

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module Main where
2+
3+
import qualified Data.Map as M
4+
import qualified Data.Set as S
5+
import SetOperations
6+
import Utils.Containers.Internal.StrictPair
7+
8+
main =
9+
benchmark'
10+
(\xs -> M.fromList [(x, x) | x <- xs])
11+
S.fromList
12+
True
13+
[ ("partitionKeys", M.partitionKeys)
14+
]

Diff for: containers-tests/containers-tests.cabal

+9
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,15 @@ benchmark set-operations-set
227227
other-modules: SetOperations
228228
ghc-options: -O2
229229

230+
benchmark partition-keys-mapset
231+
import: benchmark-deps
232+
default-language: Haskell2010
233+
type: exitcode-stdio-1.0
234+
hs-source-dirs: benchmarks/SetOperations
235+
main-is: PartitionKeys-MapSet.hs
236+
other-modules: SetOperations
237+
ghc-options: -O2
238+
230239
benchmark lookupge-intmap
231240
import: benchmark-deps
232241
default-language: Haskell2010

0 commit comments

Comments
 (0)