News for hackers. Stuff that matters.
Re:Rope (data structure) by bzbarsky on Saturday June 08, 2013 @09:37PM (#5847120)
A DOM tree is rather a pain to implement in practice. You need fast foo.childNodes[i] and also fast foo.nextChild. And fast inserts and removes. And APIs that use (parent, offset) pairs as their basic concept (like ranges) and other APIs that use (parent, prevSibling) pairs (like node insertion). Oh, and memory use needs to be minimal. And the code needs to have low constants, not just low algorithmic complexity.
Re:Rope (data structure) by Roboprog on Sunday June 09, 2013 @12:40PM (#5849505)
Good point! Sloth and inertia usually allows me to use the work of others in this case (XML DOM, when appropriate), though, but that doesn't make it internally simply (or efficient).