diff options
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-parse.js | 10 | ||||
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-serialize.js | 6 | ||||
-rw-r--r-- | benchmark/url/whatwg-url-properties.js | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/benchmark/url/legacy-vs-whatwg-url-parse.js b/benchmark/url/legacy-vs-whatwg-url-parse.js index 6e5e25d2312..94115d1305b 100644 --- a/benchmark/url/legacy-vs-whatwg-url-parse.js +++ b/benchmark/url/legacy-vs-whatwg-url-parse.js @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { function useLegacy(data) { const len = data.length; - var result = url.parse(data[0]); // Avoid dead code elimination + let result = url.parse(data[0]); // Avoid dead code elimination bench.start(); for (let i = 0; i < len; ++i) { result = url.parse(data[i]); @@ -24,7 +24,7 @@ function useLegacy(data) { function useWHATWGWithBase(data) { const len = data.length; - var result = new URL(data[0][0], data[0][1]); // Avoid dead code elimination + let result = new URL(data[0][0], data[0][1]); // Avoid dead code elimination bench.start(); for (let i = 0; i < len; ++i) { const item = data[i]; @@ -36,7 +36,7 @@ function useWHATWGWithBase(data) { function useWHATWGWithoutBase(data) { const len = data.length; - var result = new URL(data[0]); // Avoid dead code elimination + let result = new URL(data[0]); // Avoid dead code elimination bench.start(); for (let i = 0; i < len; ++i) { result = new URL(data[i]); @@ -47,8 +47,8 @@ function useWHATWGWithoutBase(data) { function main({ e, method, type, withBase }) { withBase = withBase === 'true'; - var noDead; // Avoid dead code elimination. - var data; + let noDead; // Avoid dead code elimination. + let data; switch (method) { case 'legacy': data = common.bakeUrlData(type, e, false, false); diff --git a/benchmark/url/legacy-vs-whatwg-url-serialize.js b/benchmark/url/legacy-vs-whatwg-url-serialize.js index 5523e549ceb..e3254ede3ac 100644 --- a/benchmark/url/legacy-vs-whatwg-url-serialize.js +++ b/benchmark/url/legacy-vs-whatwg-url-serialize.js @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { function useLegacy(data) { const obj = url.parse(data[0]); const len = data.length; - var noDead = url.format(obj); + let noDead = url.format(obj); bench.start(); for (let i = 0; i < len; i++) { noDead = data[i].toString(); @@ -25,7 +25,7 @@ function useLegacy(data) { function useWHATWG(data) { const obj = new URL(data[0]); const len = data.length; - var noDead = obj.toString(); + let noDead = obj.toString(); bench.start(); for (let i = 0; i < len; i++) { noDead = data[i].toString(); @@ -37,7 +37,7 @@ function useWHATWG(data) { function main({ type, e, method }) { const data = common.bakeUrlData(type, e, false, false); - var noDead; // Avoid dead code elimination. + let noDead; // Avoid dead code elimination. switch (method) { case 'legacy': noDead = useLegacy(data); diff --git a/benchmark/url/whatwg-url-properties.js b/benchmark/url/whatwg-url-properties.js index ac71ff4f636..f0ba2931e51 100644 --- a/benchmark/url/whatwg-url-properties.js +++ b/benchmark/url/whatwg-url-properties.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { function setAndGet(data, prop) { const len = data.length; - var result = data[0][prop]; + let result = data[0][prop]; bench.start(); for (let i = 0; i < len; ++i) { result = data[i][prop]; @@ -24,7 +24,7 @@ function setAndGet(data, prop) { function get(data, prop) { const len = data.length; - var result = data[0][prop]; + let result = data[0][prop]; bench.start(); for (let i = 0; i < len; ++i) { result = data[i][prop]; // get |