Skip to content

Commit

Permalink
chore: tweak benchmark file
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed May 4, 2021
1 parent 6708d82 commit 97a2f60
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -4,11 +4,13 @@ import current from "../../lib/index.js";
import { report } from "../util.mjs";

const suite = new Benchmark.Suite();
// All codepoints in [0x4e00, 0x9ffc] is valid identifier name
// All codepoints in [0x4e00, 0x9ffc] are valid identifier name per Unicode 13
function createInput(length) {
if (length > 0x9ffc - 0x4e00) {
throw new Error(
"Does not support such big length, consider modify the `createInput`"
`Length greater than ${
0x9ffc - 0x4e00
} is not supported! Consider modify the \`createInput\`.`
);
}
let source = "class C { ";
Expand All @@ -26,7 +28,7 @@ function benchCases(name, implementation, options) {
}
}

benchCases("baseline", baseline, { plugins: ["classPrivateProperties"] });
benchCases("baseline", baseline);
benchCases("current", current);

suite.on("cycle", report).run();

0 comments on commit 97a2f60

Please sign in to comment.