min-bench
v1.0.2
Published
Simple benchmark for javascript code
Downloads
2
Readme
min-bench
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][downloads-url] [![Dependency Status][david-image]][david-url] [npm-image]: https://img.shields.io/npm/v/min-bench.svg?style=flat-square [npm-url]: https://npmjs.org/package/min-bench [downloads-image]: http://img.shields.io/npm/dm/min-bench.svg?style=flat-square [downloads-url]: https://npmjs.org/package/min-bench [david-image]: http://img.shields.io/david/chunpu/min-bench.svg?style=flat-square [david-url]: https://david-dm.org/chunpu/min-bench
Simple benchmark for javascript code
Installation
npm i min-bench
Usage
var b = require('min-bench')
b('code in with', function(n) {
for (var i = 0; i < n; i++) {
with (Math) {
var a = floor(1.234)
}
}
})
// =>
// code in with 645.59 ns/op
see more in demo.js