0.0.6 ā¢ Published 9 years ago
tiny-bench v0.0.6
tiny-bench
Minimum benchmark tool.
installation
npm i -D tiny-bench
usage
const tb = require('tiny-bench')
tb.test['join'] = () => {
['a', 'b', 'c'].join('')
}
tb.test['reduce'] = () => {
['a', 'b', 'c'].reduce((a, c) => a + c)
}
tb.run()
--------------------------------------------------
join x 2,333,476 ops/sec Ā±1.75% (83 runs sampled)
reduce x 10,681,067 ops/sec Ā±1.20% (84 runs sampled)
--------------------------------------------------
š reduce
š join