From: Matthew Fernandez Date: Sat, 26 Jun 2021 03:11:49 +0000 (-0700) Subject: remove a micro-optimization in checkpath X-Git-Tag: 2.48.0~25^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=036a73f4601816ccb5ccd7e46857f2524d20e91f;p=graphviz 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. --- 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;