From b039dd10828c3c7947a42036772f7d1a51fec9cd Mon Sep 17 00:00:00 2001 From: Gregory Shklover Date: Thu, 22 Sep 2022 07:27:48 +0000 Subject: [PATCH] Small performance improvement to simplex --- lib/common/ns.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/common/ns.c b/lib/common/ns.c index 89613d5f3..42fdff6fb 100644 --- a/lib/common/ns.c +++ b/lib/common/ns.c @@ -471,11 +471,13 @@ subtree_t *merge_trees(Agedge_t *e) /* entering tree edge */ if (t0->heap_index == -1) { // move t0 delta = SLACK(e); - tree_adjust(t0->rep,NULL,delta); + if (delta != 0) + tree_adjust(t0->rep,NULL,delta); } else { // move t1 delta = -SLACK(e); - tree_adjust(t1->rep,NULL,delta); + if (delta != 0) + tree_adjust(t1->rep,NULL,delta); } if (add_tree_edge(e) != 0) { return NULL; -- 2.40.0