Closed briancavalier closed 9 years ago
The perf increases for any and some grow as array size grows. Perhaps more importantly, though, for any
, all
and map
, this improves the early bailout performance. For example, if the first item in an array passed to all
is a rejection, this will bail out of the main algorithm and use a fast path to mark any remaining potentially rejected promises as "handled". It also fixes a regression in 3.6.0 that prevented early bailout entirely in all
and map
.
They now use similar patterns to _traverse. Also: fix
_traverse
fast-path on first rejection. SimplifyresolveAndObserveRemaining
tovisitRemaining
and expose as private API to allow other array combinators to take advantage of it.