Rewrite red-black trees.

Use left-leaning 2-3 red-black trees instead of left-leaning 2-3-4
red-black trees.  This reduces maximum tree height from (3 lg n) to
(2 lg n).

Do lazy balance fixup, rather than transforming the tree during the down
pass.  This improves insert/remove speed by ~30%.

Use callback-based iteration rather than macros.
4 files changed
tree: a3443bf0ccb3088b46c822d984216ad5afc60697
  1. jemalloc/
  2. .gitignore