Angular forEach performance

Benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Native forEach
arr.forEach(function(item) {});
ready
Angular forEach
angular.forEach(arr, function(item) {});
ready
Native For
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.