Forked from davidmarkclements/context-allocated-vars.js
Last active
October 31, 2016 18:49
-
-
Save fhinkel/adb226206d6bdcdbb045e85ad2ce33a3 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
function valuesFn (array) { | |
var i = 0 | |
return function foo (abort, cb) { | |
if(i >= array.length) | |
cb(true) | |
else | |
cb(null, array[i++]) | |
} | |
} | |
for( var a = 0; a < 100000; a++ ) { | |
valuesFn([], function() {}) | |
} |
Author
fhinkel
commented
Oct 31, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment