Thread (38 messages) 38 messages, 4 authors, 2012-08-07

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

From: Rik van Riel <hidden>
Date: 2012-08-05 23:21:09
Also in: lkml

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
- check that node is NOT the fetched child

This avoids fetching the parent's left child when node is actually
that child. Saves a bit on code size, though it doesn't seem to make
a large difference in speed.

Signed-off-by: Michel Lespinasse<redacted>
Acked-by: Rik van Riel <redacted>


-- 
All rights reversed

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help