Skip to content

Instantly share code, notes, and snippets.

@chjj chjj/calleebench.js
Created May 9, 2011

Embed
What would you like to do?
callee bench
var times = 15000;
(function() {
var i = 0, start = Date.now();
(function() {
if (++i < times) arguments.callee.call();
})();
console.log('callee', Date.now() - start);
})();
(function() {
var i = 0, start = Date.now();
(function _() {
if (++i < times) _.call();
})();
console.log('named', Date.now() - start);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.