Currently, all available multiset-based assertions (such as contains_exactly_in_any_order) use the slow VecMultiset, while for some types, faster approaches exist.
Duplicate all assertions for types which implement Hash (using a HashMap-based multiset implementation) or Ord (using BTreeMap). Adapt the names to encode which implementation is used (such as contains_exactly_in_any_order_using_hash).
The assertions should not be included in the prelude to avoid clutter. Instead, add a fast_prelude module to contain such assertions.
[x] Add hash-based collection assertions
[x] Add btree-based collection assertions
[x] Add hash-based map assertions
[x] Add btree-based map assertions
[x] Benchmark the implementations to verify they are faster
[x] Document the new fast_prelude properly (also at top-level)
Currently, all available multiset-based assertions (such as
contains_exactly_in_any_order
) use the slowVecMultiset
, while for some types, faster approaches exist.Duplicate all assertions for types which implement
Hash
(using aHashMap
-based multiset implementation) orOrd
(usingBTreeMap
). Adapt the names to encode which implementation is used (such ascontains_exactly_in_any_order_using_hash
).The assertions should not be included in the prelude to avoid clutter. Instead, add a
fast_prelude
module to contain such assertions.fast_prelude
properly (also at top-level)