check and new var (v15)

Revision 15 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/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);
}
ready
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);
}
ready
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);
}
ready
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);
}
ready

Revisions

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