for-in-tests

Benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
for (var index in arr)
var arr  = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

for (var i in arr) {}
ready
for (var i = 0; i < arr.length; i++)
var arr  = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

for (var i = 0; i < arr.length; i++) {}
ready

Revisions

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