Get Object Keys (v2)

Revision 2 of this benchmark created on


Description

Testing getting object keys

Preparation HTML

<script>
  var obj = {
   a: 1,
   b: 2,
   c: 3
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Array Push
var arr = [];
for (var key in obj) {
 arr.push(key);
}
ready
For in
var arr = [];
for (arr[arr.length] in obj);
ready

Revisions

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