diff options
| author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-17 04:01:12 +0300 |
|---|---|---|
| committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-20 04:46:37 +0300 |
| commit | 22aa3d48997f1fc31e9c9cc08ec76a5436c93fe3 (patch) | |
| tree | 255361bcfb0611af60f6c7c101c886687d0ce047 /benchmark/compare.js | |
| parent | bbbb1f60780d9b8ef812769e215be830c4d968b8 (diff) | |
| download | node-new-22aa3d48997f1fc31e9c9cc08ec76a5436c93fe3.tar.gz | |
benchmark: reduce string concatenations
PR-URL: https://github.com/nodejs/node/pull/12455
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/compare.js')
| -rw-r--r-- | benchmark/compare.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/compare.js b/benchmark/compare.js index 4d183a10e2..aa6ddb72c0 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -79,14 +79,14 @@ if (showProgress) { // Construct configuration string, " A=a, B=b, ..." let conf = ''; for (const key of Object.keys(data.conf)) { - conf += ' ' + key + '=' + JSON.stringify(data.conf[key]); + conf += ` ${key}=${JSON.stringify(data.conf[key])}`; } conf = conf.slice(1); // Escape quotes (") for correct csv formatting conf = conf.replace(/"/g, '""'); - console.log(`"${job.binary}", "${job.filename}", "${conf}", ` + - `${data.rate}, ${data.time}`); + console.log(`"${job.binary}", "${job.filename}", "${conf}", ${ + data.rate}, ${data.time}`); if (showProgress) { // One item in the subqueue has been completed. progress.completeConfig(data); |
