mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
benchmark: refactor to eliminate redeclared vars
In order to comply with linting rules used in the rest of the code base, eliminate redeclared variables. A conservative approach is used so as to avoid unintentional performance issues (for example, as might be seen in some situations when using `let` instead of `var`). PR-URL: https://github.com/nodejs/node/pull/5468 Reviewed-By: Brian White <mscdex@mscdex.net>
This commit is contained in:
1 parent
d1a82c6824
commit
7cae774d9b
10 files changed
+51
-40
No files matched your search
@@ -43,14 +43,15 @@ function main(conf) {
|
||||
querystring.parse(input, '&&&&&&&&&&');
|
||||
}
|
||||
|
||||
var i;
|
||||
if (type !== 'multicharsep') {
|
||||
bench.start();
|
||||
for (var i = 0; i < n; i += 1)
|
||||
for (i = 0; i < n; i += 1)
|
||||
querystring.parse(input);
|
||||
bench.end(n);
|
||||
} else {
|
||||
bench.start();
|
||||
for (var i = 0; i < n; i += 1)
|
||||
for (i = 0; i < n; i += 1)
|
||||
querystring.parse(input, '&&&&&&&&&&');
|
||||
bench.end(n);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user