Skip to content

Commit

Permalink
Update benchmark
Browse files Browse the repository at this point in the history
* Add asm, though it doesn't make it faster. TODO: use avx instructions.
* Do 10x less hashes, since sha256 is more expensive.
  • Loading branch information
garious committed Feb 19, 2018
1 parent 6effd64 commit ba90e43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ $ rustup install nightly
Run the benchmarks:

```bash
$ cargo +nightly bench --features="unstable"
$ cargo +nightly bench --features="asm,unstable"
```
4 changes: 2 additions & 2 deletions src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ mod bench {
#[bench]
fn event_bench(bencher: &mut Bencher) {
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(|| {
assert!(verify_slice(&events, &start_hash));
});
Expand All @@ -158,7 +158,7 @@ mod bench {
#[bench]
fn event_bench_seq(bencher: &mut Bencher) {
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(|| {
assert!(verify_slice_seq(&events, &start_hash));
});
Expand Down

0 comments on commit ba90e43

Please sign in to comment.