JavaScript Array Performance — for vs for...of vs for...in vs forEach vs reduce (version: 1)
Compare the performance of five ways to traverse an array and accumulate a computed numeric result. All test cases execute the same work on the same input data. Note that for...in enumerates property keys rather than using the array iterator, so its semantics differ from for, for...of, forEach, and reduce.
Comparing performance of: for vs for...of vs for...in vs forEach vs reduce