Re: [PATCH v3 3/9] rbtree: place easiest case first in rb_erase()

2012-08-20 Thread Andrew Morton
On Mon, 20 Aug 2012 15:05:25 -0700 Michel Lespinasse wrote: > In rb_erase, move the easy case (node to erase has no more than > 1 child) first. I feel the code reads easier that way. Well. For efficiency we should put the commonest case first. Is that the case here? > --- a/lib/rbtree.c >

[PATCH v3 3/9] rbtree: place easiest case first in rb_erase()

2012-08-20 Thread Michel Lespinasse
In rb_erase, move the easy case (node to erase has no more than 1 child) first. I feel the code reads easier that way. Signed-off-by: Michel Lespinasse Reviewed-by: Rik van Riel --- lib/rbtree.c | 35 ++- 1 files changed, 18 insertions(+), 17 deletions(-)

[PATCH v3 3/9] rbtree: place easiest case first in rb_erase()

2012-08-20 Thread Michel Lespinasse
In rb_erase, move the easy case (node to erase has no more than 1 child) first. I feel the code reads easier that way. Signed-off-by: Michel Lespinasse wal...@google.com Reviewed-by: Rik van Riel r...@redhat.com --- lib/rbtree.c | 35 ++- 1 files changed, 18

Re: [PATCH v3 3/9] rbtree: place easiest case first in rb_erase()

2012-08-20 Thread Andrew Morton
On Mon, 20 Aug 2012 15:05:25 -0700 Michel Lespinasse wal...@google.com wrote: In rb_erase, move the easy case (node to erase has no more than 1 child) first. I feel the code reads easier that way. Well. For efficiency we should put the commonest case first. Is that the case here? ---