settimeout-arguments-callee-vs-named-function

Benchmark created by Stephen on


Description

Test using arguments.callee in a recursive setTimeout versus using a named function.

Preparation HTML

<script>
  function doStuff() {
   return false;
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Arguments.callee
(function() {
 doStuff();
 setTimeout(arguments.callee, 100);
}());
ready
Named Function
(function loopy() {
 doStuff();
 setTimeout(loopy, 100);
}());
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Stephen on