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 authored and Evan Lucas committed 2018-01-30 14:25:25 -06:00
1 parent 5b0e3b9860
commit 97e882061d
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);