-
-
Save aqrln/195743d38f632b5b9a8d5944f30cb6af to your computer and use it in GitHub Desktop.
benchmark/util/*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const common = require('../common'); | |
const util = require('util'); | |
const bench = common.createBenchmark(main, { | |
n: [1000], | |
len: [1e5] | |
}); | |
function main(conf) { | |
const arr = new Array(conf.len).fill(0); | |
bench.start(); | |
for (let i = 0; i < conf.n; i++) { | |
util.inspect(arr); | |
} | |
bench.end(conf.n); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const common = require('../common'); | |
const util = require('util'); | |
const bench = common.createBenchmark(main, { | |
n: [1000], | |
len: [1e5] | |
}); | |
function main(conf) { | |
const arr = new Array(conf.len); | |
bench.start(); | |
for (let i = 0; i < conf.n; i++) { | |
util.inspect(arr); | |
} | |
bench.end(conf.n); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment