cujojs / when

A solid, fast Promises/A+ and when() implementation, plus other async goodies.
Other
3.44k stars 396 forks source link

Improve map perf (again) #396

Closed briancavalier closed 9 years ago

briancavalier commented 9 years ago

This change increases the performance of map by 10x or more for large arrays, and significantly decreases mem usage. Map operates in a single pass now, instead of 2 passes--1 to map, 1 to await with all().

The size diff is negligible--around 20 bytes min+gzip. The perf impact on all() is also negligible--less than 1%.