]>
git.proxmox.com Git - rustc.git/blob - src/libcollections/benches/vec_deque.rs
1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 use std
::collections
::VecDeque
;
12 use test
::{Bencher, black_box}
;
15 fn bench_new(b
: &mut Bencher
) {
17 let ring
: VecDeque
<i32> = VecDeque
::new();
23 fn bench_grow_1025(b
: &mut Bencher
) {
25 let mut deq
= VecDeque
::new();
34 fn bench_iter_1000(b
: &mut Bencher
) {
35 let ring
: VecDeque
<_
> = (0..1000).collect();
47 fn bench_mut_iter_1000(b
: &mut Bencher
) {
48 let mut ring
: VecDeque
<_
> = (0..1000).collect();