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 engine: share frozen syntactic feature structures on internal Word clones (about 15% of a heavy Sena profile, never isolated) #595
Internal clones of a frozen Word deep-copy its SyntacticFeatureStruct, then freeze and hash it again when building analysis keys. The change adds Word.CloneForEngine, which shares the frozen structure until a rule must mutate it. The three in-place analysis mutation sites call EnsureOwnSyntacticFeatureStruct first. A per-Morpher setting (HC_SHARE_SYNTACTIC_FS=false opts out) controls sharing. Public Word.Clone() stays a deep, mutable clone. This is sharing, not a cache. CloneForEngine and EnsureOwnSyntacticFeatureStruct are on the archived branch only.
Measured. The heaviest Sena profile attributed roughly 15% of CPU to freezing and hashing a newly cloned syntactic feature structure while building analysis keys. The five-language measurement is branch-wide, so no standalone speedup is assigned. The wall-clock figure is a profile share and is not attributed.
What a revival must do first. Time it with the toggle alone, in clones and freezes avoided. Do not use the old morph-count signature for parity. Sharing is unavailable for mutable source words.
Activity