benchmark: var to const

PR-URL: https://github.com/nodejs/node/pull/13757
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Ruben Bridgewater 2017-09-13 22:48:53 -03:00
parent b1c8f15c5f
commit e167ab71fb
No known key found for this signature in database
GPG key ID: F07496B3EB3C1762
120 changed files with 682 additions and 682 deletions

View file

@ -1,17 +1,17 @@
'use strict';
var common = require('../common.js');
var querystring = require('querystring');
var inputs = require('../fixtures/url-inputs.js').searchParams;
const common = require('../common.js');
const querystring = require('querystring');
const inputs = require('../fixtures/url-inputs.js').searchParams;
var bench = common.createBenchmark(main, {
const bench = common.createBenchmark(main, {
type: Object.keys(inputs),
n: [1e6],
});
function main(conf) {
var type = conf.type;
var n = conf.n | 0;
var input = inputs[type];
const type = conf.type;
const n = conf.n | 0;
const input = inputs[type];
var i;
// Execute the function a "sufficient" number of times before the timed
// loop to ensure the function is optimized just once.