test (v5)

Revision 5 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
object.hasOwnProperty
var object = {},
      array = [],
      i, test = 1001;
  
  for (i = 0; i < 1000; i++) {
   object['something' + i] = true;
  }
ready
array.indexOf
var object = {},
      array = [],
      i, test = 1001;
  
  for (i = 0; i < 1000; i++) {
   array.push('something' + i);
  }
ready
in
('something' + test) in object
ready
direct
object['something' + test] === true
ready

Revisions

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