Speed comparison between Array.prototype.reduce using array destructuring vs Array.prototype.flatMap, for a 500 by 20 two-dimensional array, simulating 20 pages each with 500 items
Comparing performance of: Array.prototype.reduce vs Array.prototype.flatMap
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Array.prototype.reduce
Array.prototype.flatMap
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
2 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36