From 036a73f4601816ccb5ccd7e46857f2524d20e91f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 25 Jun 2021 20:11:49 -0700 Subject: [PATCH] remove a micro-optimization in checkpath Self-stores like this are effectively free on a modern CPU. The branch guarding this store is more costly than the store itself. --- lib/common/routespl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/common/routespl.c b/lib/common/routespl.c index 2b0bd5374..3e9e8e1fa 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -668,8 +668,7 @@ static int checkpath(int boxn, boxf* boxes, path* thepath) continue; if (fabs(boxes[bi].LL.x - boxes[bi].UR.x) < .01) continue; - if (i != bi) - boxes[i] = boxes[bi]; + boxes[i] = boxes[bi]; i++; } boxn = i; -- 2.40.0