Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
loop compary
(version: 0)
Comparing performance of:
map vs for of vs for shit
Created:
6 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
const ITERATIONS = 50000; var list = []; for (let i = 0; i < ITERATIONS; i += 1) { list.push(Math.random()); } let a
Tests:
map
list.map(item => (a=item))
for of
for (let item of list) { a = item }
for shit
for(let i = 0; i < list.length; i++) { a = list[i] }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
map
for of
for shit
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Fill array with random integers
JavaScript spread operator vs Slice/Splice performance testing
JavaScript spread vs slice vs for
JavaScript Array.slice vs Array.slice(0)
fdgfd ergfdg gergtdg
Comments
Confirm delete:
Do you really want to delete benchmark?