You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HermitCrab analysis: defer the per-template clone in AnalysisAffixTemplateRule (1.054x wall-clock, not a step count) #586
AnalysisAffixTemplateRule.Apply makes an internal engine clone of the input, freezes it once per template, and runs the slot DFS on the clone. The input is already frozen at every call site and slot rules never mutate it, so the DFS can run on the input directly. Only the two emission points that can pass the input through unchanged (ApplySlots terminal, ParallelApplySlots push) need a frozen clone. The traced path keeps the eager clone, because the trace manager stamps CurrentTrace onto the words it is given. The change is on the archived branch perf/hc-optimization-archive.
Measured. Clone-discard count (Amharic): 2,505 clones created, 1,659 discarded (66%). Wall-clock A/B on 45 Sena words, min of two interleaved rounds: 1.054x overall, 1.02x to 1.08x on heavy words. No step count was recorded. Parity was checked with WordAnalysisSignature, which on Sena compares morph counts only.
What a revival must do first. Re-measure in steps or allocations rather than wall time. Check parity with a gloss, allomorph-index and syntactic-feature-structure signature, not morph counts. The saving is allocation only, so a port that already clones lazily gains nothing.
Activity