Zero-alloc trie lookups (#3998)
* triedb cleanup * factor out common portion of trie query * allocate far fewer times in node decoding * fix bench compilation * introduce OwnedNode variant to make iter fast again * generalize recorder trait to Query * decode trie outputs cost-free in state * test for passing closure as query
This commit is contained in:
committed by
Gav Wood
parent
e983339edd
commit
9c00eb4e8a
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! benchmarking for rlp
|
||||
//! benchmarking for bigint
|
||||
//! should be started with:
|
||||
//! ```bash
|
||||
//! multirust run nightly cargo bench
|
||||
@@ -24,10 +24,10 @@
|
||||
#![feature(asm)]
|
||||
|
||||
extern crate test;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_util;
|
||||
|
||||
use test::{Bencher, black_box};
|
||||
use bigint::uint::{U256, U512, Uint, U128};
|
||||
use ethcore_util::{U256, U512, Uint, U128};
|
||||
|
||||
#[bench]
|
||||
fn u256_add(b: &mut Bencher) {
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
|
||||
extern crate test;
|
||||
extern crate rlp;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_util as util;
|
||||
|
||||
use test::Bencher;
|
||||
use std::str::FromStr;
|
||||
use rlp::*;
|
||||
use bigint::uint::U256;
|
||||
use util::U256;
|
||||
|
||||
#[bench]
|
||||
fn bench_stream_u64_value(b: &mut Bencher) {
|
||||
|
||||
Reference in New Issue
Block a user