fixed rlp benchmarks

This commit is contained in:
debris 2016-02-02 02:31:17 +01:00
parent baec2909b6
commit 26652a2ed8

View File

@ -63,9 +63,9 @@ fn bench_stream_nested_empty_lists(b: &mut Bencher) {
b.iter(|| {
// [ [], [[]], [ [], [[]] ] ]
let mut stream = RlpStream::new_list(3);
stream.append_list(0);
stream.append_list(1).append_list(0);
stream.append_list(2).append_list(0).append_list(1).append_list(0);
stream.begin_list(0);
stream.begin_list(1).begin_list(0);
stream.begin_list(2).begin_list(0).begin_list(1).begin_list(0);
let _ = stream.out();
});
}
@ -89,7 +89,7 @@ fn bench_stream_1000_empty_lists(b: &mut Bencher) {
b.iter(|| {
let mut stream = RlpStream::new_list(1000);
for _ in 0..1000 {
stream.append_list(0);
stream.begin_list(0);
}
let _ = stream.out();
});