Skip to content

Commit 5246c79

Browse files
rijnbclaude
andcommitted
revert: A2 — reorder fitsInsideBoundaries (caused regression)
Reverts b9b3f2c. isInRange() wraps longitude and has higher overhead than simple comparisons; testing it first regressed user time by ~7.9s vs A1 baseline. Reverting to lat-first ordering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b9b3f2c commit 5246c79

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mapcodelib/mapcoder.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ static int isInRange(int lonMicroDeg, const int minLonMicroDeg, const int maxLon
602602
static int fitsInsideBoundaries(const Point32* coord32, const TerritoryBoundary* b) {
603603
ASSERT(coord32);
604604
ASSERT(b);
605-
return (isInRange(coord32->lonMicroDeg, b->minx, b->maxx) &&
606-
b->miny <= coord32->latMicroDeg &&
607-
coord32->latMicroDeg < b->maxy);
605+
return (b->miny <= coord32->latMicroDeg &&
606+
coord32->latMicroDeg < b->maxy &&
607+
isInRange(coord32->lonMicroDeg, b->minx, b->maxx));
608608
}
609609

610610

0 commit comments

Comments
 (0)