array sum of elements (v104)

Revision 104 of this benchmark created on


Preparation HTML

<script>
let arr = [100, 91, 5, 781, 0, 294, 582, 1060];
let sum = 0;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Array.reduce()
console.log(arr.reduce((sum, value) => sum + value, 0));
ready
for..of
for (const el of arr) {
  sum += el;
}
console.log(sum);
ready

Revisions

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