Skip to content

Instantly share code, notes, and snippets.

@chjj
Created May 9, 2011 08:22
Show Gist options
  • Select an option

  • Save chjj/962230 to your computer and use it in GitHub Desktop.

Select an option

Save chjj/962230 to your computer and use it in GitHub Desktop.
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