Commit b9b3f2c
perf: A2 — reorder fitsInsideBoundaries to test longitude first
Most territory rectangles are narrower in longitude than in latitude
relative to their bounding ranges, so testing longitude first short-
circuits faster on the typical reject case.
time ./unittest (best of 3, user):
baseline = 114.13s
after A2 = 121.10s
delta = -6.11% cumulative (regression vs baseline)
Note: result is slower than A1 (T2=112.21s); the lon-first ordering
did not yield a speedup on this benchmark — likely because isInRange
carries more overhead than the simple comparison it replaces.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 430bbba commit b9b3f2c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
606 | | - | |
607 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| |||
0 commit comments