JS and OOP (v11)

Revision 11 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Constructor
function myObject() {
  this.iAm = 'an object';
  this.whatAmI = function() {
    alert('I am ' + this.iAm);
  };
};
ready
Literal
var myObject = {
  iAm: 'an object',
  whatAmI: function() {
    alert('I am ' + this.iAm);
  }
}
ready

Revisions

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