Latest Results
perf(router-core): replace the LRU cache with a trimmed SIEVE cache
The hand-rolled doubly-linked LRU relinked the hit entry to the newest
position on every `get`. Every cache in the router (resolvePathCache,
the route tree's matchCache/singleCache/flatCache, the SSR manifest
cache) is hit-dominated: a page of links re-resolves the same handful
of paths on every navigation, so the relink was pure overhead.
SIEVE (https://cachemon.github.io/SIEVE-website/) keeps a FIFO list and
a visited bit per entry; a hit only sets the bit, and eviction sweeps a
hand from the oldest entry, clearing bits and dropping the first
unvisited one. Same API as before (`get`/`set`/`clear`, fixed `max`),
no dependency, and the old implementation's stale-`oldest` eviction
edge case is gone.
Microbenchmark (ns/op, Node 25): get-hit 17.0 -> 13.9, set-insert
64.9 -> 50.8, set-evict 79.9 -> 79.9, scan-then-return 41.0 -> 34.8,
get-miss 16.2 -> 19.3. Hit ratios on the links and route-tree-scale
client-nav traces are identical (working sets of 3-9 keys never evict).
Bundle gzip: react-router.minimal -8 B, react-router.full -15 B.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1tX2n8xegVBsZqoJPu7iv Latest Branches
+4%
0%
perf/single-search-validation-lean +11%
© 2026 CodSpeed Technology