AngularJS forEach vs Native forEach (v10)

Revision 10 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.4/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.