Avoid expensive assert! in bucket sort function

This commit is contained in:
Loïc Lecrenier 2023-03-30 13:07:17 +02:00
parent ee8a9e0bad
commit 2a5997fb20

View File

@ -206,7 +206,9 @@ pub fn bucket_sort<'ctx, Q: RankingRuleQueryTrait>(
&next_bucket.candidates,
);
assert!(ranking_rule_universes[cur_ranking_rule_index].is_superset(&next_bucket.candidates));
debug_assert!(
ranking_rule_universes[cur_ranking_rule_index].is_superset(&next_bucket.candidates)
);
ranking_rule_universes[cur_ranking_rule_index] -= &next_bucket.candidates;
if cur_ranking_rule_index == ranking_rules_len - 1