AngularJS forEach vs Native forEach (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js">
</script>
<script>
  var arr = new Array(1000);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
AngularJS forEach
arr.forEach(function(item) {});
ready
Native forEach
angular.forEach(arr, function(item) {});
ready
for key in arr
for (var key in arr) {
  arr[key];
}
ready

Revisions

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