Minor cleanup

This commit is contained in:
Erick Tryzelaar 2014-05-25 21:51:12 -07:00
parent f274dcbd44
commit 7206db4b0b
2 changed files with 37 additions and 39 deletions

View File

@ -380,14 +380,6 @@ fn bench_decoder_vec_int_000(b: &mut Bencher) {
})
}
#[bench]
fn bench_deserializer_vec_int_000(b: &mut Bencher) {
b.iter(|| {
let v: Vec<int> = vec!();
run_deserializer(deserializer::IntDeserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_decoder_vec_int_003(b: &mut Bencher) {
b.iter(|| {
@ -396,14 +388,6 @@ fn bench_decoder_vec_int_003(b: &mut Bencher) {
})
}
#[bench]
fn bench_deserializer_vec_int_003(b: &mut Bencher) {
b.iter(|| {
let v: Vec<int> = vec!(1, 2, 3);
run_deserializer(deserializer::IntDeserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_decoder_vec_int_100(b: &mut Bencher) {
b.iter(|| {
@ -412,14 +396,6 @@ fn bench_decoder_vec_int_100(b: &mut Bencher) {
})
}
#[bench]
fn bench_deserializer_vec_int_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<int> = range(0, 100).collect();
run_deserializer(deserializer::IntDeserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_decoder_vec_u8_000(b: &mut Bencher) {
b.iter(|| {
@ -428,14 +404,6 @@ fn bench_decoder_vec_u8_000(b: &mut Bencher) {
})
}
#[bench]
fn bench_deserializer_vec_u8_000(b: &mut Bencher) {
b.iter(|| {
let v: Vec<u8> = vec!();
run_deserializer(deserializer::U8Deserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_decoder_vec_u8_003(b: &mut Bencher) {
b.iter(|| {
@ -445,18 +413,50 @@ fn bench_decoder_vec_u8_003(b: &mut Bencher) {
}
#[bench]
fn bench_deserializer_vec_u8_003(b: &mut Bencher) {
fn bench_decoder_vec_u8_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<u8> = vec!(1, 2, 3);
let v: Vec<u8> = range(0u8, 100).collect();
run_decoder(decoder::U8Decoder::new(v.clone()), v)
})
}
#[bench]
fn bench_deserializer_vec_int_000(b: &mut Bencher) {
b.iter(|| {
let v: Vec<int> = vec!();
run_deserializer(deserializer::IntDeserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_deserializer_vec_int_003(b: &mut Bencher) {
b.iter(|| {
let v: Vec<int> = vec!(1, 2, 3);
run_deserializer(deserializer::IntDeserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_deserializer_vec_int_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<int> = range(0, 100).collect();
run_deserializer(deserializer::IntDeserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_deserializer_vec_u8_000(b: &mut Bencher) {
b.iter(|| {
let v: Vec<u8> = vec!();
run_deserializer(deserializer::U8Deserializer::new(v.clone()), v)
})
}
#[bench]
fn bench_decoder_vec_u8_100(b: &mut Bencher) {
fn bench_deserializer_vec_u8_003(b: &mut Bencher) {
b.iter(|| {
let v: Vec<u8> = range(0u8, 100).collect();
run_decoder(decoder::U8Decoder::new(v.clone()), v)
let v: Vec<u8> = vec!(1, 2, 3);
run_deserializer(deserializer::U8Deserializer::new(v.clone()), v)
})
}

2
de.rs
View File

@ -398,8 +398,6 @@ impl<
}
}
try!(d.expect_end());
Ok(value)
}
}