summaryrefslogtreecommitdiff
path: root/benchmark/path/parse-win32.js
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/path/parse-win32.js')
-rw-r--r--benchmark/path/parse-win32.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/benchmark/path/parse-win32.js b/benchmark/path/parse-win32.js
index da48f78dd5..8c4f06272f 100644
--- a/benchmark/path/parse-win32.js
+++ b/benchmark/path/parse-win32.js
@@ -1,6 +1,6 @@
'use strict';
const common = require('../common.js');
-const path = require('path');
+const { win32 } = require('path');
const bench = common.createBenchmark(main, {
path: [
@@ -16,17 +16,13 @@ const bench = common.createBenchmark(main, {
n: [1e6]
});
-function main(conf) {
- const n = +conf.n;
- const p = path.win32;
- const input = String(conf.path);
-
+function main({ n, path }) {
for (var i = 0; i < n; i++) {
- p.parse(input);
+ win32.parse(path);
}
bench.start();
for (i = 0; i < n; i++) {
- p.parse(input);
+ win32.parse(path);
}
bench.end(n);
}