News for hackers. Stuff that matters.
Re:Modernizing the DOM Tree in Microsoft Edge by taeric on Wednesday April 19, 2017 @04:41PM (#14151565)
I was assuming you'd use a standard deque that could hide the complexity of prepending. I didn't consider that the ordinal actually matters from the parent, though. So great point! :)

And yes, this was essentially my question. What are the realistic numbers in either scenario.

Re:Modernizing the DOM Tree in Microsoft Edge by jdmichal on Wednesday April 19, 2017 @04:58PM (#14151709)
Right. If you don't cache the ordinal, than "next sibling" and "previous sibling" operations have to scan the array.

But it's a relatively easy performance enhancement to have a validity flag for the ordinals, and only rewrite them when a read requires them. That way, write-heavy workloads won't be punished.