Skip to content

Comments

Rustworkx acceleration#381

Draft
InnovativeInventor wants to merge 26 commits intomainfrom
retworkx
Draft

Rustworkx acceleration#381
InnovativeInventor wants to merge 26 commits intomainfrom
retworkx

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.

2 participants