Fix benchmarks.
This commit is contained in:
parent
afc4f73ebf
commit
c0eaf8a921
@ -34,7 +34,7 @@ fn bench_engine_register_fn(bench: &mut Bencher) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bench.iter(|| {
|
bench.iter(|| {
|
||||||
let mut engine = Engine::new();
|
let mut engine = Engine::new_raw();
|
||||||
engine.register_fn("hello", hello);
|
engine.register_fn("hello", hello);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@ use test::Bencher;
|
|||||||
// This script uses the Sieve of Eratosthenes to calculate prime numbers.
|
// This script uses the Sieve of Eratosthenes to calculate prime numbers.
|
||||||
|
|
||||||
const SCRIPT: &str = r#"
|
const SCRIPT: &str = r#"
|
||||||
let now = timestamp();
|
|
||||||
|
|
||||||
const MAX_NUMBER_TO_CHECK = 1_000; // 168 primes <= 1000
|
const MAX_NUMBER_TO_CHECK = 1_000; // 168 primes <= 1000
|
||||||
|
|
||||||
let prime_mask = [];
|
let prime_mask = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user