florian1345 / kernal

Kernal Extensive Rust Natural Assertion Language
Other
3 stars 0 forks source link

Add optimized (multi)set-based assertions #41

Closed florian1345 closed 1 year ago

florian1345 commented 1 year ago

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.