Skip to content

perf(gota): skip visibility checks for worse targets - #99

Merged
macromackie merged 1 commit into
mainfrom
codex/gota-target-filter
Oct 9, 2026
Merged

macromackie merged 1 commit into
mainfrom
codex/gota-target-filter

Conversation

@macromackie

@macromackie macromackie commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

GotA target acquisition checks visibility even for enemies that cannot beat the current nearest target. Moving the read-only visibility lookup after the existing distance and tie predicate skips those unnecessary lookups in footman and hero acquisition. Scan order, tie rules, and target updates stay unchanged.

Manual Tests

  • Eight paired full matches used BASIC and neural rosters across four match/map seed combinations. Both variants used the same pinned Nim/GCC release build; each pair ran in the same container, with execution order alternating by seed.
  • All eight pairs produced byte-identical replays and equal parsed results. Median native wall-time savings were 1.00% (103 ms), ranging from 0.31% to 1.43%. This is a small effect with one pair per configuration.
  • Measurements used release source 02eda3d; the target-selection source and dependencies are unchanged on this PR's base 179603b.

Measurement report, raw samples, patch, and build identity (organization access required).

[Prepared with Codex]

@macromackie
macromackie marked this pull request as ready for review October 9, 2026 05:41
@macromackie
macromackie merged commit 5bc91c6 into main Oct 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant