Fix benchmarks.

This commit is contained in:
Stephen Chung 2020-04-24 16:20:03 +08:00
parent afc4f73ebf
commit c0eaf8a921
2 changed files with 1 additions and 3 deletions

View File

@ -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);
}); });
} }

View File

@ -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 = [];