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 shapes: build the node map inside Shape.CopyTo's copy pass (no isolated measurement) #592
Shape.CopyTo copies the nodes of a range, then builds the source-to-copy node map in a second pass with Zip and ToDictionary, so that annotations can be remapped. The source and destination nodes are already visited in matching order during cloning, so the loop can record the mapping as it goes. The change allocates the map on the first node of a nonempty range and fills it in the copy pass, and skips the map for an empty range. It removes one enumeration and one LINQ dictionary from each annotated shape copy. The change is on the archived branch perf/hc-optimization-archive.
Measured. Nothing in isolation. It was timed only together with shape copy-on-write and the feature-structure clone work, so no standalone ratio is claimed.
What a revival must do first. Measure it alone, in allocations per shape copy. Keep ShapeCopyToTests (empty ranges, leaf and spanning annotations, remapping, independence of the copy).
Activity