## Current Stage: Cycle 20 — Hot-Path Performance (Identity Hashing)
### Status: COMPLETE
### Research
- **Stakker**: Closure-based dispatch. `call!` macro generates `FnOnce` closures pushed to a flat byte Vec queue. No HashMap, no Box<dynAny>, no downcast. Direct method calls that the compiler can inline. Single-threaded only.
- **Actix**: Vtable dispatch via `Box<dyn EnvelopeProxy<A>>`. `Addr<A>` is a direct channel reference (no HashMap lookup). Custom Vyukov lock-free MPSC queue. Default mailbox capacity 16.
- **Key insight**: Both avoid HashMap entirely by using direct references. Swactor needs HashMaps for location-transparent 32-byte addresses (multi-worker routing + transport). The optimization is to minimize HashMap cost, not eliminate it.
- Full analysis: `CLAUDE/notes/dispatch_comparison.md`
### Implementation
1.**Custom `Hash` for ActorAddress** (`src/actor.rs`) — only hashes first 8 bytes instead of 32. All HashMaps using ActorAddress benefit automatically.
2.**Identity hasher** (`src/delivery.rs`) — `AddrHasher`/`AddrBuildHasher` that passes the 8-byte hash value through as the bucket index directly, skipping SipHash.
3.**Hot-path HashMap replacement** — `AddrMap<V>` type alias used in:
-`AddressMap.inner` (delivery.rs) — on every send
-`ActorPool.actors` (worker.rs) — on every deliver and tick_all
-`InboxRegistry.senders` (delivery.rs)
-`MonitorRegistry.monitors` (delivery.rs)
-`NameRegistry.reverse` (delivery.rs)
-`GroupRegistry.memberships` + `AddrSet` for group member sets (delivery.rs)
-`TransportRouter.routes` (transport.rs)
4.**Stop-requests optimization** (worker.rs) — `is_empty()` short-circuit before linear scan in inner message loop