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

improve subgraph count_nodes performance #1869

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Conversation

ljeub-pometry
Copy link
Collaborator

What changes were proposed in this pull request?

Refactor NodeSubgraph so it actually uses the NodeList optimisation

Why are the changes needed?

calling count_nodes on a subgraph was unnecessarily iterating through all nodes

Does this PR introduce any user-facing change? If yes is this documented?

No api changes

How was this patch tested?

the tests

Copy link
Collaborator

@fabianmurariu fabianmurariu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: cf63697 Previous: 0414b7f Ratio
lotr_graph_subgraph_10pc/iterate edges 17999 ns/iter (± 93) 6570 ns/iter (± 104) 2.74
lotr_graph_subgraph_10pc_windowed/iterate edges 17421 ns/iter (± 70) 6678 ns/iter (± 20) 2.61
lotr_graph_subgraph_10pc_windowed/iterate_exploded_edges 21656 ns/iter (± 256) 10670 ns/iter (± 103) 2.03

This comment was automatically generated by workflow using github-action-benchmark.

@ljeub-pometry
Copy link
Collaborator Author

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'. Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: cf63697 Previous: 0414b7f Ratio
lotr_graph_subgraph_10pc/iterate edges 17999 ns/iter (± 93) 6570 ns/iter (± 104) 2.74
lotr_graph_subgraph_10pc_windowed/iterate edges 17421 ns/iter (± 70) 6678 ns/iter (± 20) 2.61
lotr_graph_subgraph_10pc_windowed/iterate_exploded_edges 21656 ns/iter (± 256) 10670 ns/iter (± 103) 2.03
This comment was automatically generated by workflow using github-action-benchmark.

This is fixed

@ljeub-pometry ljeub-pometry merged commit 4672baa into master Nov 26, 2024
19 checks passed
@ljeub-pometry ljeub-pometry deleted the performance/subgraph branch November 26, 2024 09:25
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