From e8825678899e4407214be76dc2117d745e3f70e2 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Feb 2011 19:29:33 +0100 Subject: [PATCH] Speed up A* neighbor cache hits struct sctstr members sct_x, sct_y are normalized, no need to normalize them again. The neighbor cache now speeds up distribution path assembly by about 10% without the path cache, and by about 5% with the path cache. --- src/lib/common/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/common/path.c b/src/lib/common/path.c index 58fded858..7350e3099 100644 --- a/src/lib/common/path.c +++ b/src/lib/common/path.c @@ -227,8 +227,8 @@ bp_neighbors(struct as_coord c, struct as_coord *cp, void *pp) *ssp = sp; } else { sp = *ssp; - sx = XNORM(sp->sct_x); - sy = YNORM(sp->sct_y); + sx = sp->sct_x; + sy = sp->sct_y; } /* No need to calculate cost each time, just make sure we can move through it. We calculate it later. */ -- 2.43.0