Speed Testing for Methods.js

JavaScript performance comparison

Test case created by Shawn

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
for
var a = {
  1: function(){ return "Foo"; },
  2: function(){ return "Foo"; },
  3: function(){ return "Foo"; },
  4: function(){ return "Foo"; },
  5: function(){ return "Foo"; },
  6: function(){ return "Foo"; },
  7: function(){ return "Foo"; },
  8: function(){ return "Foo"; },
  9: function(){ return "Foo"; },
  10: function(){ return "Foo"; },
  11: function(){ return "Foo"; },
  12: function(){ return "Foo"; },
  13: function(){ return "Foo"; },
  14: function(){ return "Foo"; },
  15: function(){ return "Foo"; },
  16: function(){ return "Foo"; },
  17: function(){ return "Foo"; },
  18: function(){ return "Foo"; },
  19: function(){ return "Foo"; },
  20: function(){ return "Foo"; },
  21: function(){ return "Foo"; },
  22: function(){ return "Foo"; },
  23: function(){ return "Foo"; },
  24: function(){ return "Foo"; },
  25: function(){ return "Foo"; },
  26: function(){ return "Foo"; },
  27: function(){ return "Foo"; },
  28: function(){ return "Foo"; },
  29: function(){ return "Foo"; },
  30: function(){ return "Foo"; },
  31: function(){ return "Foo"; },
  32: function(){ return "Foo"; },
  33: function(){ return "Foo"; },
  34: function(){ return "Foo"; },
  35: function(){ return "Foo"; },
  36: function(){ return "Foo"; }

};
var b = {};

for (var key in a) {
  b[key] = a[key];
}
pending…
just normal
var a = b = {
  1: "1",
  2: "2",
  3: "3"
};
pending…

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

Compare results of other browsers

0 comments

Add a comment