Re: [PATCH 2/6] rbtree: optimize fetching of sibling node

2012-07-24 Thread Rik van Riel
On 07/20/2012 08:31 AM, Michel Lespinasse wrote: When looking to fetch a node's sibling, we went through a sequence of: - check if node is the parent's left child - if it is, then fetch the parent's right child This can be replaced with: - fetch the parent's right child as an assumed sibling -

Re: [PATCH 2/6] rbtree: optimize fetching of sibling node

2012-07-24 Thread Rik van Riel
On 07/20/2012 08:31 AM, Michel Lespinasse wrote: When looking to fetch a node's sibling, we went through a sequence of: - check if node is the parent's left child - if it is, then fetch the parent's right child This can be replaced with: - fetch the parent's right child as an assumed sibling -

[PATCH 2/6] rbtree: optimize fetching of sibling node

2012-07-20 Thread Michel Lespinasse
When looking to fetch a node's sibling, we went through a sequence of: - check if node is the parent's left child - if it is, then fetch the parent's right child This can be replaced with: - fetch the parent's right child as an assumed sibling - check that node is NOT the fetched child This

[PATCH 2/6] rbtree: optimize fetching of sibling node

2012-07-20 Thread Michel Lespinasse
When looking to fetch a node's sibling, we went through a sequence of: - check if node is the parent's left child - if it is, then fetch the parent's right child This can be replaced with: - fetch the parent's right child as an assumed sibling - check that node is NOT the fetched child This