Array of objects loop for vs foreach vs map vs for..of + slice vs for (version: 0)
Comparing performance of: foreach vs for vs map vs for..of vs slice + [x, ...y] vs for (no slice) vs for + push vs slice + [x, ...y] v2 vs slice + [x, ...y] v3
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
foreach
for
map
for..of
slice + [x, ...y]
for (no slice)
for + push
slice + [x, ...y] v2
slice + [x, ...y] v3
Fastest:N/A
Slowest:N/A
ⓘGet performance results from real users on your website with Request Metrics.
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one to run it!