On Mon, Aug 6, 2012 at 7:23 AM, Peter Zijlstra wrote:
> On Thu, 2012-08-02 at 15:34 -0700, Michel Lespinasse wrote:
>
>> + tmp = gparent->rb_right;
>> + if (parent != tmp) {/* parent == gparent->rb_left */
>
>> + tmp = parent->rb_right;
>> +
On Thu, 2012-08-02 at 15:34 -0700, Michel Lespinasse wrote:
> + tmp = gparent->rb_right;
> + if (parent != tmp) {/* parent == gparent->rb_left */
> + tmp = parent->rb_right;
> + if (node == tmp) {
> + tmp = p
On 08/02/2012 06:34 PM, 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
- c
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 avoid
4 matches
Mail list logo