Anonymous vs Named Functions (v4)

Revision 4 of this benchmark created on


Setup

function named(x, y) {
      return x + y;
    }
    var unnamed = function(x, y) {
      return x + y;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Named
for (var i = 0; i < 5; i++) {
  named(i, 20);
}
ready
Anonymous
for (var i =0; i < 5; i++) {
  unnamed(i, 20);
}
ready

Revisions

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