visionmedia/node-thunkify — pull request #4 by EvanCarroll (2014-01-20 20:32:30+00:00)
Title: micro optimization, moved Array Prototype lookup outside of function

Because of the nature of the library, you may want to accept a minor revision for speed,

var BM = require('benchmark');

var apslice = Array.prototype.slice;
var f1 = function () { apslice.call(arguments) };
var f2 = function () { [].slice.call(arguments) };

var suite = new BM.Suite;

suite.add('f1', f1).add('f2', f2)
.on('cycle', function(event) {
console.log(String(event.target));
})
.on('complete', function() {
console.log('Fastest is ', this.filter('fastest').pluck('name') );
})
.run({async:false});