Reorder benches const variable
Move LEN so it is is read in order.
This commit is contained in:
parent
26373fb4ba
commit
55ba9e4755
@ -570,6 +570,8 @@ fn bench_in_place_collect_droppable(b: &mut Bencher) {
|
||||
})
|
||||
}
|
||||
|
||||
const LEN: usize = 16384;
|
||||
|
||||
#[bench]
|
||||
fn bench_chain_collect(b: &mut Bencher) {
|
||||
let data = black_box([0; LEN]);
|
||||
@ -613,8 +615,6 @@ pub fn map_fast(l: &[(u32, u32)]) -> Vec<u32> {
|
||||
result
|
||||
}
|
||||
|
||||
const LEN: usize = 16384;
|
||||
|
||||
#[bench]
|
||||
fn bench_range_map_collect(b: &mut Bencher) {
|
||||
b.iter(|| (0..LEN).map(|_| u32::default()).collect::<Vec<_>>());
|
||||
|
Loading…
Reference in New Issue
Block a user