Files
bun.sh/bench/snippets/url.mjs
Michael H b54137174b Bench updates (#15029)
Co-authored-by: RiskyMH <RiskyMH@users.noreply.github.com>
2024-11-08 23:15:24 -08:00

20 lines
474 B
JavaScript

import { bench, run } from "../runner.mjs";
bench(`new URL('https://example.com/')`, () => {
const url = new URL("https://example.com/");
});
bench(`new URL('https://example.com')`, () => {
const url = new URL("https://example.com");
});
bench(`new URL('https://www.example.com')`, () => {
const url = new URL("https://www.example.com");
});
bench(`new URL('https://www.example.com/')`, () => {
const url = new URL("https://www.example.com/");
});
await run();