Skip to content

Commit

Permalink
Make merge specialization benchmark more realistic
Browse files Browse the repository at this point in the history
  • Loading branch information
kinto-b authored and Philippe-Cholet committed Apr 24, 2024
1 parent fb48ff5 commit 8583689
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions benches/specializations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,29 +582,29 @@ bench_specializations! {
}
merge {
{
let v1 = black_box(vec![0; 1024]);
let v2 = black_box(vec![0; 768]);
let v1 = black_box((0..1024).collect_vec());
let v2 = black_box((0..768).collect_vec());
}
v1.iter().merge(&v2)
}
merge_by {
{
let v1 = black_box(vec![0; 1024]);
let v2 = black_box(vec![0; 768]);
let v1 = black_box((0..1024).collect_vec());
let v2 = black_box((0..768).collect_vec());
}
v1.iter().merge_by(&v2, PartialOrd::ge)
}
merge_join_by_ordering {
{
let v1 = black_box(vec![0; 1024]);
let v2 = black_box(vec![0; 768]);
let v1 = black_box((0..1024).collect_vec());
let v2 = black_box((0..768).collect_vec());
}
v1.iter().merge_join_by(&v2, Ord::cmp)
}
merge_join_by_bool {
{
let v1 = black_box(vec![0; 1024]);
let v2 = black_box(vec![0; 768]);
let v1 = black_box((0..1024).collect_vec());
let v2 = black_box((0..768).collect_vec());
}
v1.iter().merge_join_by(&v2, PartialOrd::ge)
}
Expand Down

0 comments on commit 8583689

Please sign in to comment.