From 3b0f062e583bab99331cdfc0dbdae8d72c1806e8 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 14 Aug 2005 23:00:57 +0000 Subject: [PATCH] Trim some fat; removing this assertion makes Remove() about 5% faster. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4413 --- coregrind/m_oset.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/coregrind/m_oset.c b/coregrind/m_oset.c index 41b57447d..b170d020e 100644 --- a/coregrind/m_oset.c +++ b/coregrind/m_oset.c @@ -358,9 +358,7 @@ static inline Int cmp_key_root(AvlTree* t, AvlNode* n) // Returns True if the depth of the tree has grown. static Bool avl_insert(AvlTree* t, AvlNode* n) { - Int cmpres; - - cmpres = cmp_key_root(t, n); + Int cmpres = cmp_key_root(t, n); if (cmpres < 0) { // Insert into the left subtree. @@ -517,11 +515,7 @@ static Bool avl_removeroot(AvlTree* t); static Bool avl_remove(AvlTree* t, AvlNode* n) { Bool ch; - Int cmpres; - - vg_assert(t && t->root); - - cmpres = cmp_key_root(t, n); + Int cmpres = cmp_key_root(t, n); if (cmpres < 0) { // Remove from the left subtree