check and new var

JavaScript performance comparison

Revision 15 of this test case created by

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
check
var obj = {
  'adf': 1,
  'a': 2,
  'b': 3,
  'c': 4,
  'ass': 2,
  'bsdf': 3,
  'c33': 4,
  'asfdb': 2,
  'bsdft': 3,
  'csdf': 4,

  'a2df': 1,
  'a2': 2,
  'b2': 3,
  'c2': 4,
  'a22ss': 2,
  'b22sdf': 3,
  'c2233': 4,
  'as22fdb': 2,
  'bs22dft': 3,
  'cs22df': 4,

  'a2df': 1,
  'a32': 2,
  'b32': 3,
  'c32': 4,
  'a3322ss': 2,
  'b322sdf': 3,
  'c332233': 4,
  'as3322fdb': 2,
  'bs232dft': 3,
  'cs322df': 4,
};

if (obj['prop']) {
  var p = opj['prop'];
  console.log(p);
}
pending…
new var
var obj = {
  'adf': 1,
  'a': 2,
  'b': 3,
  'c': 4,
  'ass': 2,
  'bsdf': 3,
  'c33': 4,
  'asfdb': 2,
  'bsdft': 3,
  'csdf': 4,

  'a2df': 1,
  'a2': 2,
  'b2': 3,
  'c2': 4,
  'a22ss': 2,
  'b22sdf': 3,
  'c2233': 4,
  'as22fdb': 2,
  'bs22dft': 3,
  'cs22df': 4,

  'a2df': 1,
  'a32': 2,
  'b32': 3,
  'c32': 4,
  'a3322ss': 2,
  'b322sdf': 3,
  'c332233': 4,
  'as3322fdb': 2,
  'bs232dft': 3,
  'cs322df': 4,
};

var p = obj['prop'];
if (p) {
  console.log(p);
}
pending…
new var2
var obj = {
  'adf': 1,
  'a': 2,
  'b': 3,
  'c': 4,
  'ass': 2,
  'bsdf': 3,
  'c33': 4,
  'asfdb': 2,
  'bsdft': 3,
  'csdf': 4,

  'a2df': 1,
  'a2': 2,
  'b2': 3,
  'c2': 4,
  'a22ss': 2,
  'b22sdf': 3,
  'c2233': 4,
  'as22fdb': 2,
  'bs22dft': 3,
  'cs22df': 4,

  'a2df': 1,
  'a32': 2,
  'b32': 3,
  'c32': 4,
  'a3322ss': 2,
  'b322sdf': 3,
  'c332233': 4,
  'as3322fdb': 2,
  'bs232dft': 3,
  'cs322df': 4,
  'prop': 234
};

var p = obj['prop'];
if (p) {
  console.log(p);
}
pending…
check2
var obj = {
  'adf': 1,
  'a': 2,
  'b': 3,
  'c': 4,
  'ass': 2,
  'bsdf': 3,
  'c33': 4,
  'asfdb': 2,
  'bsdft': 3,
  'csdf': 4,

  'a2df': 1,
  'a2': 2,
  'b2': 3,
  'c2': 4,
  'a22ss': 2,
  'b22sdf': 3,
  'c2233': 4,
  'as22fdb': 2,
  'bs22dft': 3,
  'cs22df': 4,

  'a2df': 1,
  'a32': 2,
  'b32': 3,
  'c32': 4,
  'a3322ss': 2,
  'b322sdf': 3,
  'c332233': 4,
  'as3322fdb': 2,
  'bs232dft': 3,
  'cs322df': 4,
  'prop': 234
};

if (obj['prop']) {
  var p = obj['prop'];
  console.log(p);
}
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.

0 Comments