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
>
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(-)
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
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?
---
4 matches
Mail list logo