Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Only check partial convexity for SimpleReplacement subgraphs. #1869

Open
aborgna-q opened this issue Jan 16, 2025 · 0 comments
Open

perf: Only check partial convexity for SimpleReplacement subgraphs. #1869

aborgna-q opened this issue Jan 16, 2025 · 0 comments
Labels
perf Performance issue rust Pull requests that update Rust code

Comments

@aborgna-q
Copy link
Collaborator

aborgna-q commented Jan 16, 2025

See discussion #1656 ("Can we avoid the convexity work altogether?").

Requires CQCL/portgraph#161 to be published in portgraph.
Requires #1872.

SiblingSubgraph currently requires the subgraph to be convex. This is no longer needed for doing replacements if we can prove that the new node boundary orders are no stricter than the original ones. We should only need to check this if the new port pairs in PortOrdering::missing_pairs had an external reverse dependency before.

@aborgna-q aborgna-q added perf Performance issue rust Pull requests that update Rust code labels Jan 16, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 20, 2025
The new portgraph release comes with some perf improvements.
We require this update for #1869.

Closes #1872.

I added a benchmark variation for subgraphs with few nodes as a
drive-by.
This got improved by the new portgraph (skipping a full graph
traversal), but the runtime is still mostly the `O(n)` full-graph
traversal required for the convexity checking when building the
subgraph.

BREAKING CHANGE: Bumped public dependency `portgraph` to breaking
version `0.13`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf Performance issue rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant