* Simd poh

* Fix poh verify bench
This commit is contained in:
sakridge
2020-06-16 23:03:26 -07:00
committed by GitHub
parent 891aa8c13e
commit 0de6c444d6
8 changed files with 248 additions and 17 deletions

View File

@@ -12,8 +12,10 @@ const NUM_ENTRIES: usize = 800;
#[bench]
fn bench_poh_verify_ticks(bencher: &mut Bencher) {
solana_logger::setup();
let zero = Hash::default();
let mut cur_hash = hash(&zero.as_ref());
let start_hash = hash(&zero.as_ref());
let mut cur_hash = start_hash;
let mut ticks: Vec<Entry> = Vec::with_capacity(NUM_ENTRIES);
for _ in 0..NUM_ENTRIES {
@@ -21,14 +23,15 @@ fn bench_poh_verify_ticks(bencher: &mut Bencher) {
}
bencher.iter(|| {
ticks.verify(&cur_hash);
assert!(ticks.verify(&start_hash));
})
}
#[bench]
fn bench_poh_verify_transaction_entries(bencher: &mut Bencher) {
let zero = Hash::default();
let mut cur_hash = hash(&zero.as_ref());
let start_hash = hash(&zero.as_ref());
let mut cur_hash = start_hash;
let keypair1 = Keypair::new();
let pubkey1 = keypair1.pubkey();
@@ -40,6 +43,6 @@ fn bench_poh_verify_transaction_entries(bencher: &mut Bencher) {
}
bencher.iter(|| {
ticks.verify(&cur_hash);
assert!(ticks.verify(&start_hash));
})
}

View File

@@ -172,7 +172,11 @@ impl Validator {
info!("entrypoint: {:?}", entrypoint_info_option);
info!("Initializing sigverify, this could take a while...");
if solana_perf::perf_libs::api().is_some() {
info!("Initializing sigverify, this could take a while...");
} else {
info!("Initializing sigverify...");
}
sigverify::init();
info!("Done.");