Skip to content

Commit

Permalink
Note that the benchmark is on the worst case
Browse files Browse the repository at this point in the history
  • Loading branch information
meooow25 committed Aug 17, 2024
1 parent 9d9f833 commit e4f2b51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion containers-tests/benchmarks/IntMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ main = do
, bench "spanAntitone" $ whnf (M.spanAntitone (<key_mid)) m
, bench "split" $ whnf (M.split key_mid) m
, bench "splitLookup" $ whnf (M.splitLookup key_mid) m
, bench "eq" $ whnf (\m' -> m' == m') m
, bench "eq" $ whnf (\m' -> m' == m') m -- worst case, compares everything
]
where
elems = elems_hits
Expand Down
2 changes: 1 addition & 1 deletion containers-tests/benchmarks/IntSet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ main = do
, bench "split:sparse" $ whnf (IS.split elem_sparse_mid) s_sparse
, bench "splitMember:dense" $ whnf (IS.splitMember elem_mid) s
, bench "splitMember:sparse" $ whnf (IS.splitMember elem_sparse_mid) s_sparse
, bench "eq" $ whnf (\s' -> s' == s') s
, bench "eq" $ whnf (\s' -> s' == s') s -- worst case, compares everything
]
where
bound = 2^12
Expand Down

0 comments on commit e4f2b51

Please sign in to comment.