3 ms·
Array.map/filter/forEach aren't just slow because of function call overhead. They have different semantics than the for loop that you'd typically write (and tha
by jwmerrill 13y ago
Array.map/filter/forEach aren't just slow because of function call overhead. They have different semantics than the for loop that you'd typically write (and that Coffeescript generates), because they support things like arrays with non-incremental keys. See the reference implementation at [1].
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#compatibility https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- deleted 13y ago[deleted]