Skip to content

zipper: short-circuit on shared subtries#36

Open
marcin-rzeznicki wants to merge 3 commits intozipper_join_nfrom
experiment_with_shared_nodes
Open

zipper: short-circuit on shared subtries#36
marcin-rzeznicki wants to merge 3 commits intozipper_join_nfrom
experiment_with_shared_nodes

Conversation

@marcin-rzeznicki
Copy link
Copy Markdown
Collaborator

Enhance merge logic by detecting structural sharing:

  • on function entry
  • immediately after descending on a shared edge

If all active zippers share the same node, delegate to MergePolicy::on_id
and skip the entire subtree.

@Adam-Vandervorst
Copy link
Copy Markdown
Owner

Since this code is contingent on a criterion that does occur in PathMaps loaded from a set (without merkleize), I'd like to see some tests that specifically exercise this codepath.

@marcin-rzeznicki
Copy link
Copy Markdown
Collaborator Author

Since this code is contingent on a criterion that does occur in PathMaps loaded from a set (without merkleize), I'd like to see some tests that specifically exercise this codepath.

Fixed in 9ff3982 - I think the test gives us enough coverage

@Adam-Vandervorst
Copy link
Copy Markdown
Owner

Yes, at least this is some sniff test, and we can ramp up the testing with the property-based testing when we move this out of experimental.

@Adam-Vandervorst
Copy link
Copy Markdown
Owner

I'm good with merging it now.

@marcin-rzeznicki
Copy link
Copy Markdown
Collaborator Author

Thanks! @luketpeterson do you have any remarks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants