From: Nicholas Nethercote Date: Sun, 14 Aug 2005 23:00:57 +0000 (+0000) Subject: Trim some fat; removing this assertion makes Remove() about 5% faster. X-Git-Tag: svn/VALGRIND_3_1_0~605 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b0f062e583bab99331cdfc0dbdae8d72c1806e8;p=thirdparty%2Fvalgrind.git Trim some fat; removing this assertion makes Remove() about 5% faster. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4413 --- diff --git a/coregrind/m_oset.c b/coregrind/m_oset.c index 41b57447dc..b170d020eb 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