Fix performance regressions: remove TIER0, consolidate scratchpads, remove Arc trap
Key fixes based on benchmark analysis: 1. Remove TIER0 Vec-based pathfinding - O(N) linear scan was slower than FxHashMap for typical path lengths 2. Consolidate scratchpads into single AStarScratchpad struct - eliminates nested RefCell borrow overhead 3. Remove Arc wrapper from TileMap - eliminated Copy-on-Write trap causing 63ms stutters 4. Replace AHashMap with FxHashMap - FxHash is faster for small integer keys like IVec3 5. Simplify tier logic - single pathfinding function with scratchpad reuse Benchmark analysis showed: - Original: 1.95 µs/node, P99 1.1ms, Max 5ms - TIER0/TIER1 regression: 2.89 µs/node (+48%), P99 5ms (+348%) - Root causes: Vec linear scan in TIER0, nested RefCell borrows, Arc::make_mut CoW This should restore and improve performance by using simple FxHashMap scratchpad for all paths.
This commit is contained in: