Update benchmark

* Add asm, though it doesn't make it faster. TODO: use avx instructions.
* Do 10x less hashes, since sha256 is more expensive.
This commit is contained in:
Greg Fitzgerald 2018-02-19 16:51:32 -07:00
parent 6effd64ab0
commit ba90e43f72
2 changed files with 3 additions and 3 deletions

View File

@ -104,5 +104,5 @@ $ rustup install nightly
Run the benchmarks: Run the benchmarks:
```bash ```bash
$ cargo +nightly bench --features="unstable" $ cargo +nightly bench --features="asm,unstable"
``` ```

View File

@ -149,7 +149,7 @@ mod bench {
#[bench] #[bench]
fn event_bench(bencher: &mut Bencher) { fn event_bench(bencher: &mut Bencher) {
let start_hash = Default::default(); let start_hash = Default::default();
let events = create_ticks(&start_hash, 100_000, 8); let events = create_ticks(&start_hash, 10_000, 8);
bencher.iter(|| { bencher.iter(|| {
assert!(verify_slice(&events, &start_hash)); assert!(verify_slice(&events, &start_hash));
}); });
@ -158,7 +158,7 @@ mod bench {
#[bench] #[bench]
fn event_bench_seq(bencher: &mut Bencher) { fn event_bench_seq(bencher: &mut Bencher) {
let start_hash = Default::default(); let start_hash = Default::default();
let events = create_ticks(&start_hash, 100_000, 8); let events = create_ticks(&start_hash, 10_000, 8);
bencher.iter(|| { bencher.iter(|| {
assert!(verify_slice_seq(&events, &start_hash)); assert!(verify_slice_seq(&events, &start_hash));
}); });