Optimize RGA.merge()
- optimize lookup for existent nodes :
- assuming nodes are in the right order in the delta
(already assumed to some extent),
resume lookup right after the previous node position (using subList())
→ would reduce total cost of existence checks to one scan - OR add a Set of known nodes
→ total checks cost in O(delta size) instead of O(local size), but requires to update the Set in modifiers
- assuming nodes are in the right order in the delta
(already assumed to some extent),
resume lookup right after the previous node position (using subList())
- optimize siblings lookup:
- scan from previous node instead of beginning
- directly find first older sibling, not all siblings
- [optional] track the current path in the tree to optimize the rare case
→ harder to implement, may not be worth the effort