cujojs/when — pull request #391 by briancavalier (2014-11-03 02:31:36+00:00)
Title: Improve reduce and reduceRight perf

This uses recursion (which will be trampolined--no call stack concerns), and is 2-3x faster than the previous version which used Array.prototype.reduce. The code is a lot uglier than it should be due to having to deal with sparse arrays. At least half the new code is for sparse arrays :( Yet another reason to drop sparse array
support in 4.0.

See example of the difference here: https://gist.github.com/briancavalier/e080a3ddced89c1ece84