[PATCH 13/13] rbtree: optimize color flips in __rb_erase_color()

2012-07-09 Thread Michel Lespinasse
In __rb_erase_color(), when the current node is red or when flipping the sibling's color, the parent is already known so we can use the more efficient rb_set_parent_color() function to set the desired color. Signed-off-by: Michel Lespinasse --- lib/rbtree.c | 10 +- 1 files changed, 5

[PATCH 13/13] rbtree: optimize color flips in __rb_erase_color()

2012-07-09 Thread Michel Lespinasse
In __rb_erase_color(), when the current node is red or when flipping the sibling's color, the parent is already known so we can use the more efficient rb_set_parent_color() function to set the desired color. Signed-off-by: Michel Lespinasse wal...@google.com --- lib/rbtree.c | 10 +- 1