added xoshiro rand bench
This commit is contained in:
parent
5cc5f39440
commit
0cda3792d1
@ -9,6 +9,10 @@ edition = "2018"
|
||||
[dev-dependencies]
|
||||
criterion = "0.3" # Benchmarking
|
||||
|
||||
[[bench]]
|
||||
name = "rand_speeds"
|
||||
harness = false
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = []
|
||||
|
13
afl/benches/rand_speeds.rs
Normal file
13
afl/benches/rand_speeds.rs
Normal file
@ -0,0 +1,13 @@
|
||||
use afl::utils::{Rand, XorShift64Rand, Xoshiro256StarRand};
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
let mut xorshift = XorShift64Rand::new(0);
|
||||
let mut xoshiro = Xoshiro256StarRand::new(0);
|
||||
|
||||
c.bench_function("xorshift", |b| b.iter(|| black_box(xorshift.next())));
|
||||
c.bench_function("xoshiro", |b| b.iter(|| black_box(xoshiro.next())));
|
||||
}
|
||||
|
||||
criterion_group!(benches, criterion_benchmark);
|
||||
criterion_main!(benches);
|
@ -22,7 +22,7 @@ where
|
||||
//CE: CustomEvent<S, C, E, I, R>,
|
||||
{
|
||||
// TODO...
|
||||
_marker: PhantomData<(S, C, E, I, R)>,
|
||||
phantom: PhantomData<(S, C, E, I, R)>,
|
||||
is_broker: bool,
|
||||
}
|
||||
|
||||
|
@ -328,13 +328,6 @@ where
|
||||
dbg!("Handled {} events", count);
|
||||
self.events.clear();
|
||||
|
||||
/*
|
||||
let num = self.events.len();
|
||||
for event in &self.events {}
|
||||
|
||||
self.events.clear();
|
||||
*/
|
||||
|
||||
Ok(count)
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ use alloc::string::String;
|
||||
use core::fmt;
|
||||
#[cfg(feature = "std")]
|
||||
use std::io;
|
||||
use xxhash_rust::const_xxh3::xxh3_64_with_seed;
|
||||
|
||||
/// Main error struct for AFL
|
||||
#[derive(Debug)]
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::boxed::Box;
|
||||
|
Loading…
x
Reference in New Issue
Block a user