fixed trie benches

This commit is contained in:
debris 2015-12-11 11:53:44 +01:00
parent f19d044e7c
commit 45ee74868a

View File

@ -54,7 +54,8 @@ fn trie_insertions_six_high(b: &mut Bencher) {
b.iter(||{
let mut memdb = MemoryDB::new();
let mut t = TrieDB::new(&mut memdb);
let mut root = H256::new();
let mut t = TrieDB::new(&mut memdb, &mut root);
for i in d.iter() {
t.insert(&i.0, &i.1);
}
@ -88,7 +89,8 @@ fn trie_insertions_six_mid(b: &mut Bencher) {
}
b.iter(||{
let mut memdb = MemoryDB::new();
let mut t = TrieDB::new(&mut memdb);
let mut root = H256::new();
let mut t = TrieDB::new(&mut memdb, &mut root);
for i in d.iter() {
t.insert(&i.0, &i.1);
}
@ -124,7 +126,8 @@ fn trie_insertions_random_mid(b: &mut Bencher) {
b.iter(||{
let mut memdb = MemoryDB::new();
let mut t = TrieDB::new(&mut memdb);
let mut root = H256::new();
let mut t = TrieDB::new(&mut memdb, &mut root);
for i in d.iter() {
t.insert(&i.0, &i.1);
}
@ -160,7 +163,8 @@ fn trie_insertions_six_low(b: &mut Bencher) {
b.iter(||{
let mut memdb = MemoryDB::new();
let mut t = TrieDB::new(&mut memdb);
let mut root = H256::new();
let mut t = TrieDB::new(&mut memdb, &mut root);
for i in d.iter() {
t.insert(&i.0, &i.1);
}