Created
October 19, 2016 17:14
-
-
Save davidmarkclements/1506a061ddf4fde88d11ab454faaae5a to your computer and use it in GitHub Desktop.
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
const bench = require('fastbench') | |
function valuesFn (array) { | |
var i = 0 | |
return function (abort, cb) { | |
if(i >= array.length) | |
cb(true) | |
else | |
cb(null, array[i++]) | |
} | |
} | |
const run = bench([ | |
function benchValues (done) { | |
valuesFn([], function() {}) | |
setImmediate(done) | |
} | |
], 100000) | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
other things:
what about objects?
what about functions?
what about function-objects?