Rust编写的JavaScript引擎,该项目是一个试验性质的项目。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
368 B

#[macro_use]
extern crate criterion;
use boa::exec;
use criterion::Criterion;
fn hello_world() {
let s = &String::from("let a = 'hello world';");
exec(s.to_string());
}
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("hello_world", |b| b.iter(|| hello_world()));
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);