Select the tests you want to run below, choose either or (why?), and to compare Lazy.js, Underscore, Lo-Dash, wu.js, Sugar, From.js, IxJS, Boiler.js, and sloth.js.

You can also choose to display results in , , or (which is generally the fastest of the popular JS utility libraries). Proportional results will likely be easier to read when you've selected many benchmarks.

Comparing the performance of Lazy.js to other libraries like Underscore and Lo-Dash is unfortunately not black and white. On the one hand, calling toArray on the result of a Lazy sequence will give you an actual JavaScript array, which you might need if, e.g., you're passing the result to a function from an external library. However, in most cases when you use methods like map or filter, you are probably just going to do something while iterating over the result. In this case, you don't need an array at all; calling each on a Lazy.Sequence will be functionally indistinguishable from calling _.each on an array.

Generally speaking, Lazy.js performs best (and "wins" more performance races) when you don't have to call toArray. However, when chaining methods together it's often still the fastest solution regardless.


Test Underscore Lo-Dash Wu.js Sugar From.js IxJS Boiler.js Sloth.js Lazy.js