Sibling functions vs nested functions

Benchmark created by lolmaus on


Setup

var siblings = {
    foo: function() {},
    bar: function() { this.foo(); }
  };
  
  var nested = {
    bar: function () {
      var foo = function() {};
      foo();
    }
  }

Test runner

Ready to run.

Testing in
TestOps/sec
Siblings
siblings.bar();
ready
Nested
nested.bar();
ready

Revisions

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