Anonymous vs Named Functions (v2)

Revision 2 of this benchmark created on


Setup

function named(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++) {
  (function a(x, y) {
     return x + y;
  })(i, 20);
}
ready

Revisions

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