D-Programming-Language/druntime — pull request #788 by Safety0ff (2014-05-10 23:40:30+00:00)
Title: [Prototype] GC.add/remove Root/Range using treap instead of unsorted array.

Creating this PR for testing, comments, feedback, etc.
This is a prototype which hasn't been polished yet (PRs to this PR are welcome though)
Note:
- Users of core.memory which depended on unspecified behaviour (such as calling addRange/addRoot with the same p parameter multiple times) may suffer breakage.
- Currently iterating over root/ranges uses the stack, it would be possible to use threaded nodes or parent pointers but I'm not convinced the trade off would be worth it.