Files
horizon-airdef/crates
Ludovic Marie ed09e757ba Pathfinder: hash nodes with the Fx hasher, and work out each path type once
Path searches (vanilla's PathFinder with WalkNodeEvaluator) were 14 % of
the world tick with 80 villagers. Two costs vanilla doesn't have:

- the node index and the per-query path type and collision caches used the
  standard SipHash; vanilla keys them by packed position in fastutil maps.
  They use the Fx hasher now (nothing iterates them, so no order changes);
- a position's static path type (its block, the one below and up to 24
  neighbours, `getPathTypeStatic`) was worked out again for every mob box
  that covered it. Vanilla caches the block part level-wide
  (`PathTypeCache`); the finder now remembers each position's type for the
  query, during which the world doesn't change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 05:57:47 +02:00
..