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

Rustworkx acceleration #381

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

Rustworkx acceleration #381

wants to merge 26 commits into from

Conversation

InnovativeInventor
Copy link
Member

This is a draft PR (based off perf-tuning that rewrites the balance edge picking algorithm in Rust using retworkx, yielding a ~16x speedup in chain run times).

PA chain run times (congressional) are now at 50 it/s on my computer with commit e9eddbe (as opposed to ~3 it/s). This also leaves a few more low-hanging fruit optimizations on the table which could yield more speedups in the future.

Some of the new retworkx code has been upstreamed, other bits are in the process of being upstreamed. This PR works with my feat-balanced-cut-edges branch here: https://github.com/InnovativeInventor/retworkx/tree/feat-balanced-cut-edges.

@InnovativeInventor
Copy link
Member Author

The speedup should be > 16x now, for some computers at least.

)


def recom(
partition, pop_col, pop_target, epsilon, node_repeats=1, method=bipartition_tree
partition, pop_col, pop_target, epsilon, node_repeats=1, method=bipartition_tree_retworkx
Copy link
Member Author

Choose a reason for hiding this comment

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

Reminder to self: the method param gets ignored rn -- this should be fixed/changed.

@pjrule pjrule marked this pull request as draft February 7, 2023 19:04
@pjrule pjrule added the summer-project Summer projects for 2023 and beyond label Feb 7, 2023
@pjrule pjrule removed the summer-project Summer projects for 2023 and beyond label Apr 25, 2023
@pjrule pjrule changed the title Retworkx implementation (16x chain runtime speedup) Rustworkx acceleration Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants