Static Object Methods (v3)

Revision 3 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Separate
var SomeStaticObject = {};
SomeStaticObject.render = function() {
  return 5;
};

for (var i = 0; i < 10000; i++) {
  var a = new SomeStaticObject();
  a.render();
}
ready
Inline
var SomeStaticObject = {
  render: function() {
    return 5;
  }
};

for (var i = 0; i < 10000; i++) {
  var a = new SomeStaticObject();
  a.render();
}
ready

Revisions

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