diff options
Diffstat (limited to 'benchmark/url')
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-get-prop.js | 4 | ||||
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-parse.js | 6 | ||||
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js | 4 | ||||
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js | 4 | ||||
-rw-r--r-- | benchmark/url/legacy-vs-whatwg-url-serialize.js | 4 | ||||
-rw-r--r-- | benchmark/url/url-format.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-parse.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-resolve.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-searchparams-iteration.js | 4 | ||||
-rw-r--r-- | benchmark/url/url-searchparams-read.js | 2 | ||||
-rw-r--r-- | benchmark/url/url-searchparams-sort.js | 2 | ||||
-rw-r--r-- | benchmark/url/usvstring.js | 2 | ||||
-rw-r--r-- | benchmark/url/whatwg-url-idna.js | 2 | ||||
-rw-r--r-- | benchmark/url/whatwg-url-properties.js | 4 |
14 files changed, 22 insertions, 22 deletions
diff --git a/benchmark/url/legacy-vs-whatwg-url-get-prop.js b/benchmark/url/legacy-vs-whatwg-url-get-prop.js index 59bb4724f42..16bcd226324 100644 --- a/benchmark/url/legacy-vs-whatwg-url-get-prop.js +++ b/benchmark/url/legacy-vs-whatwg-url-get-prop.js @@ -26,7 +26,7 @@ function useLegacy(data) { // It's necessary to assign the values to an object // to avoid loop invariant code motion. bench.start(); - for (var i = 0; i < len; i++) { + for (let i = 0; i < len; i++) { const obj = data[i]; noDead.protocol = obj.protocol; noDead.auth = obj.auth; @@ -55,7 +55,7 @@ function useWHATWG(data) { }; const len = data.length; bench.start(); - for (var i = 0; i < len; i++) { + for (let i = 0; i < len; i++) { const obj = data[i]; noDead.protocol = obj.protocol; noDead.auth = `${obj.username}:${obj.password}`; diff --git a/benchmark/url/legacy-vs-whatwg-url-parse.js b/benchmark/url/legacy-vs-whatwg-url-parse.js index e3f50a76a45..7c49654b47d 100644 --- a/benchmark/url/legacy-vs-whatwg-url-parse.js +++ b/benchmark/url/legacy-vs-whatwg-url-parse.js @@ -15,7 +15,7 @@ function useLegacy(data) { const len = data.length; var result = url.parse(data[0]); // Avoid dead code elimination bench.start(); - for (var i = 0; i < len; ++i) { + for (let i = 0; i < len; ++i) { result = url.parse(data[i]); } bench.end(len); @@ -26,7 +26,7 @@ function useWHATWGWithBase(data) { const len = data.length; var result = new URL(data[0][0], data[0][1]); // Avoid dead code elimination bench.start(); - for (var i = 0; i < len; ++i) { + for (let i = 0; i < len; ++i) { const item = data[i]; result = new URL(item[0], item[1]); } @@ -38,7 +38,7 @@ function useWHATWGWithoutBase(data) { const len = data.length; var result = new URL(data[0]); // Avoid dead code elimination bench.start(); - for (var i = 0; i < len; ++i) { + for (let i = 0; i < len; ++i) { result = new URL(data[i]); } bench.end(len); diff --git a/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js b/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js index 81b5b6dc16c..f6037d332d0 100644 --- a/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js +++ b/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { function useLegacy(n, input) { querystring.parse(input); bench.start(); - for (var i = 0; i < n; i += 1) { + for (let i = 0; i < n; i += 1) { querystring.parse(input); } bench.end(n); @@ -22,7 +22,7 @@ function useLegacy(n, input) { function useWHATWG(n, param) { new URLSearchParams(param); bench.start(); - for (var i = 0; i < n; i += 1) { + for (let i = 0; i < n; i += 1) { new URLSearchParams(param); } bench.end(n); diff --git a/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js b/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js index f97961decf5..cb2301e9403 100644 --- a/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js +++ b/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js @@ -14,7 +14,7 @@ function useLegacy(n, input, prop) { const obj = querystring.parse(input); querystring.stringify(obj); bench.start(); - for (var i = 0; i < n; i += 1) { + for (let i = 0; i < n; i += 1) { querystring.stringify(obj); } bench.end(n); @@ -24,7 +24,7 @@ function useWHATWG(n, param, prop) { const obj = new URLSearchParams(param); obj.toString(); bench.start(); - for (var i = 0; i < n; i += 1) { + for (let i = 0; i < n; i += 1) { obj.toString(); } bench.end(n); diff --git a/benchmark/url/legacy-vs-whatwg-url-serialize.js b/benchmark/url/legacy-vs-whatwg-url-serialize.js index e4c821cb2e2..d6d8c8a4e71 100644 --- a/benchmark/url/legacy-vs-whatwg-url-serialize.js +++ b/benchmark/url/legacy-vs-whatwg-url-serialize.js @@ -15,7 +15,7 @@ function useLegacy(data) { const len = data.length; var noDead = url.format(obj); bench.start(); - for (var i = 0; i < len; i++) { + for (let i = 0; i < len; i++) { noDead = data[i].toString(); } bench.end(len); @@ -27,7 +27,7 @@ function useWHATWG(data) { const len = data.length; var noDead = obj.toString(); bench.start(); - for (var i = 0; i < len; i++) { + for (let i = 0; i < len; i++) { noDead = data[i].toString(); } bench.end(len); diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js index 14696af8e31..3e91cefd363 100644 --- a/benchmark/url/url-format.js +++ b/benchmark/url/url-format.js @@ -21,7 +21,7 @@ function main({ type, n }) { url.format(inputs[name]); bench.start(); - for (var i = 0; i < n; i += 1) + for (let i = 0; i < n; i += 1) url.format(input); bench.end(n); } diff --git a/benchmark/url/url-parse.js b/benchmark/url/url-parse.js index 83f626ccdad..751a11201b1 100644 --- a/benchmark/url/url-parse.js +++ b/benchmark/url/url-parse.js @@ -16,7 +16,7 @@ function main({ type, n }) { const input = inputs[type] || ''; bench.start(); - for (var i = 0; i < n; i += 1) + for (let i = 0; i < n; i += 1) url.parse(input); bench.end(n); } diff --git a/benchmark/url/url-resolve.js b/benchmark/url/url-resolve.js index bd584c6f609..9f6e958a00b 100644 --- a/benchmark/url/url-resolve.js +++ b/benchmark/url/url-resolve.js @@ -23,7 +23,7 @@ function main({ n, href, path }) { const p = paths[path]; bench.start(); - for (var i = 0; i < n; i += 1) + for (let i = 0; i < n; i += 1) url.resolve(h, p); bench.end(n); } diff --git a/benchmark/url/url-searchparams-iteration.js b/benchmark/url/url-searchparams-iteration.js index 244c95502bf..b628908d62c 100644 --- a/benchmark/url/url-searchparams-iteration.js +++ b/benchmark/url/url-searchparams-iteration.js @@ -19,7 +19,7 @@ function forEach(n) { }; bench.start(); - for (var i = 0; i < n; i += 1) + for (let i = 0; i < n; i += 1) params.forEach(cb); bench.end(n); @@ -32,7 +32,7 @@ function iterator(n) { const noDead = []; bench.start(); - for (var i = 0; i < n; i += 1) { + for (let i = 0; i < n; i += 1) { for (const pair of params) { noDead[0] = pair[0]; noDead[1] = pair[1]; diff --git a/benchmark/url/url-searchparams-read.js b/benchmark/url/url-searchparams-read.js index 2eb0a4f2135..cdaaa7ad11a 100644 --- a/benchmark/url/url-searchparams-read.js +++ b/benchmark/url/url-searchparams-read.js @@ -16,7 +16,7 @@ function main({ accessMethod, param, n }) { throw new Error(`Unknown method ${accessMethod}`); bench.start(); - for (var i = 0; i < n; i += 1) + for (let i = 0; i < n; i += 1) params[accessMethod](param); bench.end(n); } diff --git a/benchmark/url/url-searchparams-sort.js b/benchmark/url/url-searchparams-sort.js index 0d4f605fa8e..5beb98cf2d2 100644 --- a/benchmark/url/url-searchparams-sort.js +++ b/benchmark/url/url-searchparams-sort.js @@ -39,7 +39,7 @@ function main({ type, n }) { const array = getParams(input); bench.start(); - for (var i = 0; i < n; i++) { + for (let i = 0; i < n; i++) { params[searchParams] = array.slice(); params.sort(); } diff --git a/benchmark/url/usvstring.js b/benchmark/url/usvstring.js index 91abe8d6735..37141ff5512 100644 --- a/benchmark/url/usvstring.js +++ b/benchmark/url/usvstring.js @@ -21,7 +21,7 @@ function main({ input, n }) { const str = inputs[input]; bench.start(); - for (var i = 0; i < n; i++) + for (let i = 0; i < n; i++) toUSVString(str); bench.end(n); } diff --git a/benchmark/url/whatwg-url-idna.js b/benchmark/url/whatwg-url-idna.js index b67a08da7a8..853a19776df 100644 --- a/benchmark/url/whatwg-url-idna.js +++ b/benchmark/url/whatwg-url-idna.js @@ -36,7 +36,7 @@ function main({ n, to, domain }) { const method = to === 'ascii' ? domainToASCII : domainToUnicode; bench.start(); - for (var i = 0; i < n; i++) { + for (let i = 0; i < n; i++) { method(value); } bench.end(n); diff --git a/benchmark/url/whatwg-url-properties.js b/benchmark/url/whatwg-url-properties.js index 6961fec49e5..60f573e27a8 100644 --- a/benchmark/url/whatwg-url-properties.js +++ b/benchmark/url/whatwg-url-properties.js @@ -14,7 +14,7 @@ function setAndGet(data, prop) { const len = data.length; var result = data[0][prop]; bench.start(); - for (var i = 0; i < len; ++i) { + for (let i = 0; i < len; ++i) { result = data[i][prop]; data[i][prop] = result; } @@ -26,7 +26,7 @@ function get(data, prop) { const len = data.length; var result = data[0][prop]; bench.start(); - for (var i = 0; i < len; ++i) { + for (let i = 0; i < len; ++i) { result = data[i][prop]; // get } bench.end(len); |