Object membership check speed (v8)

Revision 8 of this benchmark created on


Preparation HTML

<script>
  var obj = {
   'apples': 1,
   'bananas': 1
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
in keyword
'apples' in obj;

'not_here' in obj;

'bananas' in obj;
ready
dot syntax
obj.apples!==undefined;
obj.not_here!==undefined;
obj.bananas!==undefined;
ready
array syntax
obj['apples']!==undefined;
obj['not_here']!==undefined;
obj['bananas']!==undefined;
ready

Revisions

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