DEV Community

Discussion on: Array.map() much slower than for loop

Collapse
 
joshualjohnson profile image
Joshua Johnson

Makes since, array.map calls a callback in a loop, then it's got to coordinate the callback with finishing its execution before it can move on to calling the callback again.

Them more code executions you have to do at the machine level, the slower the code will run.