We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0d33ab7 + 55ba9e4 commit 0723b27Copy full SHA for 0723b27
library/alloc/benches/vec.rs
@@ -570,6 +570,8 @@ fn bench_in_place_collect_droppable(b: &mut Bencher) {
570
})
571
}
572
573
+const LEN: usize = 16384;
574
+
575
#[bench]
576
fn bench_chain_collect(b: &mut Bencher) {
577
let data = black_box([0; LEN]);
@@ -613,8 +615,6 @@ pub fn map_fast(l: &[(u32, u32)]) -> Vec<u32> {
613
615
result
614
616
617
-const LEN: usize = 16384;
-
618
619
fn bench_range_map_collect(b: &mut Bencher) {
620
b.iter(|| (0..LEN).map(|_| u32::default()).collect::<Vec<_>>());
0 commit comments