exercise more of the in-place pipeline in the bench
This commit is contained in:
parent
a9c78e371e
commit
a596ff36b5
@ -513,7 +513,14 @@ impl Drop for Droppable {
|
||||
#[bench]
|
||||
fn bench_in_place_collect_droppable(b: &mut test::Bencher) {
|
||||
let v: Vec<Droppable> = std::iter::repeat_with(|| Droppable(0)).take(1000).collect();
|
||||
b.iter(|| v.clone().into_iter().skip(100).collect::<Vec<_>>())
|
||||
b.iter(|| {
|
||||
v.clone()
|
||||
.into_iter()
|
||||
.skip(100)
|
||||
.enumerate()
|
||||
.map(|(i, e)| Droppable(i ^ e.0))
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
|
Loading…
Reference in New Issue
Block a user