Couldn't this be more efficient by elimination old updates to children of newer updates? Say node B is a child of node A:
A
\
B
Currently, the coalesce function would do:
coal(prev[B], new[A]) = [B, A];
But since A already includes updates to B, the older B update is not necessary. You could just do:
coal(prev[B], new[A]) = [A]; because isPrevChildOfCurrent(B, A) == true
I would think this additional search would be more efficient than applying extra, unneeded DOM updates in the browser.
Preserve the order of creation for updates.