Files
ruflo/docs
rUvandClaude 0636aa749f dream(performance) (evaluated): memoize AttentionCoordinator's redundant per-head score computation (#5113)
* dream(performance): #5112 memoize AttentionCoordinator's redundant per-head score computation

multiHeadAttentionCoordination()'s computeAttentionScore(...,head) never
read `head`, so all 8 heads recomputed a byte-identical O(n^2)
cosine-similarity matrix and averaged 8 identical copies. Deferred
2026-10-30 (scored 4.60/5) to keep that night's patch to one conceptual
change; picked up tonight.

Memoized each (i,j) pair's score once per call via flat Float64Array/
Uint8Array typed arrays (a string-keyed Map was tried first and measured
slower at n>=400 -- disclosed in-source). computeAttentionScore call count
drops from numHeads*n^2 to n^2 (exact 8x, stash-verified); wall-clock
~6.2x-6.4x at n=300-400 (this session and an independent adversarial
critic, cross-validated). 7 new tests (2 discriminating, 5 controls),
full @claude-flow/swarm suite 389/389, 0 regressions, tsc clean.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH4sedj9bZPrsgZYCgn

* dream(performance): #5112 finalize witness stamp for 2026-11-25 gist

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH4sedj9bZPrsgZYCgn

* dream(performance): #5112 append 2026-11-25 ledger row

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ReiDH4sedj9bZPrsgZYCgn

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 08:45:03 -05:00
..