mikeric/rivets — pull request #311 by ydaniv (2014-05-23 08:53:00+00:00)
Title: Optimize each routine

I've tried taking a different approach here with batching together DOM changes:

* Using DocumentFragments for batching elements that need to be added/moved.
* Not reusing existing elements, hence no `update()` calls which potentially also manipulate every bound attribute on elements iteratively.
* Resolving diffs between the data first and DOM later, which results in a single change when items are shifted/unshifted to the collection.

To my dismay, results are still a quite inconclusive: http://jsperf.com/rivets-each-optimization-bulk-add/4
There are still quite some optimizations that can be done to reduce iterations in the code.

Perhaps this will be of interest to you in investigating directions in optimization.