update benches
This commit is contained in:
parent
bead910b21
commit
6c5c47b82b
1 changed files with 4 additions and 3 deletions
|
@ -440,10 +440,11 @@ macro_rules! bench_in_place {
|
||||||
#[bench]
|
#[bench]
|
||||||
fn $fname(b: &mut Bencher) {
|
fn $fname(b: &mut Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let src: Vec<$type> = vec![$init; $count];
|
let src: Vec<$type> = black_box(vec![$init; $count]);
|
||||||
black_box(src.into_iter()
|
let mut sink = src.into_iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(idx, e)| { (idx as $type) ^ e }).collect::<Vec<$type>>())
|
.map(|(idx, e)| { (idx as $type) ^ e }).collect::<Vec<$type>>();
|
||||||
|
black_box(sink.as_mut_ptr())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
)+
|
)+
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue