$.each vs js (v104)

Revision 104 of this benchmark created by Rontav on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js">
</script>
<script>
  var a = $('*').get(),
      e;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery.each
$.each(a, function() {
  e = this;
})
ready
for loop
for (var i in a) {
  e = a[i];
}
ready
Object.keys
for (var q = 0, len = Object.keys(a).length; q < len; q++) {
  e = a[Object.keys(a)[q]];
}
ready

Revisions

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