Skip to content

Commit

Permalink
Add set operations-like benchmark for Data.Map.partitionKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
sergv committed Apr 6, 2024
1 parent a4ddb15 commit 0dd488d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions containers-tests/benchmarks/SetOperations/PartitionKeys-MapSet.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module Main where

import qualified Data.Map as M
import qualified Data.Set as S
import SetOperations
import Utils.Containers.Internal.StrictPair

main =
benchmark'
(\xs -> M.fromList [(x, x) | x <- xs])
S.fromList
True
[ ("partitionKeys", M.partitionKeys)
]
9 changes: 9 additions & 0 deletions containers-tests/containers-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ benchmark set-operations-set
other-modules: SetOperations
ghc-options: -O2

benchmark partition-keys-mapset
import: benchmark-deps
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks/SetOperations
main-is: PartitionKeys-MapSet.hs
other-modules: SetOperations
ghc-options: -O2

benchmark lookupge-intmap
import: benchmark-deps
default-language: Haskell2010
Expand Down

0 comments on commit 0dd488d

Please sign in to comment.