benchmark: (string_decoder) use destructuring

PR-URL: https://github.com/nodejs/node/pull/18250
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Ruben Bridgewater committed 2018-01-23 01:29:25 +01:00
1 parent 92953fa194
commit fa3149308e
2 files changed
+4 -12

No files matched your search

@@ -9,10 +9,7 @@ const bench = common.createBenchmark(main, {
n: [25e6]
});
function main(conf) {
const encoding = conf.encoding;
const n = conf.n | 0;
function main({ encoding, n }) {
bench.start();
for (var i = 0; i < n; ++i) {
const sd = new StringDecoder(encoding);