Closed dy closed 4 years ago
all libraries are using nextSibling
, the Dommy cost is linear across implementations, right?
It'd be great to see how you're testing the real DOM though, as I think we'd like to do that too for all libraries.
Merged, current status:
@WebReflection it's pretty straightforward: https://github.com/spectjs/spect/blob/h-reducers/test/diff.js#L452-L481
Ok, this adds forward spect implementation, 218b.
It is the slowest among others (due to create/append metrics slowdown), but the reason is, I suspect, suboptimal Dommy
nextSibling
implementation. The real DOM demonstrates digits, comparable with direct appendChild: . (another possible reason - some intrinsic v8 optimizations for some algos - not going to chase that way))