deno.land / x / deno@v1.28.2 / ext / url / benches / url_ops.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use deno_bench_util::bench_js_sync;use deno_bench_util::bench_or_profile;use deno_bench_util::bencher::{benchmark_group, Bencher};
use deno_core::Extension;
fn setup() -> Vec<Extension> { vec![ deno_webidl::init(), deno_url::init(), Extension::builder() .js(vec![( "setup", "const { URL } = globalThis.__bootstrap.url;", )]) .build(), ]}
fn bench_url_parse(b: &mut Bencher) { bench_js_sync(b, r#"new URL(`http://www.google.com/`);"#, setup);}
benchmark_group!(benches, bench_url_parse,);bench_or_profile!(benches);
deno

Version Info

Tagged at
a year ago