Created
April 16, 2015 09:34
-
-
Save JacksonTian/f7a663fa83525bba8aeb to your computer and use it in GitHub Desktop.
Buffer.concat([])
This file contains hidden or 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
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite(); | |
suite | |
.add("new length 0", function () { | |
Buffer.concat([]); | |
}) | |
// add listeners | |
.on('cycle', function (event) { | |
console.log(String(event.target)); | |
}) | |
.on('complete', function () { | |
console.log('Fastest is ' + this.filter('fastest').pluck('name')); | |
}) | |
.run({ async: false }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment