Developer

JavaScript performance comparison

Revision 3 of this test case created

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Object 1
var Obj1 = function() {}
Obj1.prototype.yay = function(x) {};
Obj1.prototype.boo = function(y) {};
 
pending…
Object 2
var Obj2 = function () {
  this.yay = function(x) {};
  this.boo = function(y) {};
}
pending…
Object 3
var Obj3 = function() {};
Obj3.prototype = {
  yay: function(x) {},
  boo: function(y) {}
}
pending…
Object 4
var Obj4 = function() {};
Obj4.prototype = new function () {
  this.yay = function(x) {};
  this.boo = function(y) {};
}
pending…
mixin
var Obj5 = function() {};
var m = {
  yay: function(x) {},
  boo: function(y) {}
};
for(var p in m) {
    Obj5.prototype[p] = m[p];
}
pending…
ECMAScript 5 - 1
Object.create({
  yay: function(x) {},
  boo: function(y) {}
})
pending…
ECMAScript 5 - 2
Object.create({}, {
  yay: {value: function(x) {} },
  boo: {value: function(y) {} }
})
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment