|
From: <sv...@va...> - 2005-08-14 23:01:02
|
Author: njn
Date: 2005-08-15 00:00:57 +0100 (Mon, 15 Aug 2005)
New Revision: 4413
Log:
Trim some fat; removing this assertion makes Remove() about 5% faster.
Modified:
trunk/coregrind/m_oset.c
Modified: trunk/coregrind/m_oset.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_oset.c 2005-08-14 22:43:53 UTC (rev 4412)
+++ trunk/coregrind/m_oset.c 2005-08-14 23:00:57 UTC (rev 4413)
@@ -358,10 +358,8 @@
// Returns True if the depth of the tree has grown.
static Bool avl_insert(AvlTree* t, AvlNode* n)
{
- Int cmpres;
+ Int cmpres =3D cmp_key_root(t, n);
=20
- cmpres =3D cmp_key_root(t, n);
-
if (cmpres < 0) {
// Insert into the left subtree.
if (t->root->left) {
@@ -517,12 +515,8 @@
static Bool avl_remove(AvlTree* t, AvlNode* n)
{
Bool ch;
- Int cmpres;
+ Int cmpres =3D cmp_key_root(t, n);
=20
- vg_assert(t && t->root);
- =20
- cmpres =3D cmp_key_root(t, n);
-
if (cmpres < 0) {
// Remove from the left subtree
vg_assert(t->root->left);
|