Skip to content

Commit 042cc85

Browse files
committed
TEST: Add bench for .sort_by()
1 parent e711dbb commit 042cc85

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

benches/bench.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,3 +643,14 @@ fn many_retain_hashmap_100_000(b: &mut Bencher) {
643643
map
644644
});
645645
}
646+
647+
#[bench]
648+
fn ordermap_sort(b: &mut Bencher) {
649+
let map = OMAP_100K.clone();
650+
651+
// there's a map clone there, but it's still useful to profile this
652+
b.iter(|| {
653+
let mut map = map.clone();
654+
map.sort_keys();
655+
});
656+
}

0 commit comments

Comments
 (0)