AngularJS forEach vs Native forEach (v22)

Revision 22 of this benchmark created by John 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
Native forEach
arr.forEach(function(item) {});
ready
AngularJS 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.