diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index be5ab35ff88..ef4f508282c 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -3758,7 +3758,9 @@ mod tests { #[cfg(test)] mod bench { use extra::test::BenchHarness; + use iter::range; use vec; + use vec::VectorVector; use option::*; #[bench] @@ -3798,4 +3800,20 @@ mod bench { xs + ys; } } + + #[bench] + fn concat(bh: &mut BenchHarness) { + let xss: &[~[uint]] = vec::from_fn(100, |i| range(0, i).collect()); + do bh.iter { + xss.concat_vec(); + } + } + + #[bench] + fn connect(bh: &mut BenchHarness) { + let xss: &[~[uint]] = vec::from_fn(100, |i| range(0, i).collect()); + do bh.iter { + xss.connect_vec(&0); + } + } }