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 feature structures: skip the clone map for frozen flat trees (no isolated measurement) #587
FeatureStruct.Clone builds an old-to-new copies map on every clone. A frozen structure marked as a flat tree has no aliases or cycles below its root, so a top-level clone cannot meet the same value twice and needs no map. The change skips the map in that case. Other clones borrow a per-thread map, clear it in finally, and use a fresh map when reentered. The internal recursive constructor always uses the caller's map. This is a per-thread pooled collection, not a cross-parse cache. The change is on the archived branch perf/hc-optimization-archive.
Measured. Nothing in isolation. It was timed only as part of the package, so the record makes no speed claim.
What a revival must do first. Measure it alone, in allocations or dictionary operations avoided per clone. Keep FeatureStructCloneTests (aliases, cycles, reentrancy, a tree embedded in a shared graph) with it.
Activity