Skip to content

Comments

rewrite graph struct to be 200 times faster#3882

Merged
near-bulldozer[bot] merged 54 commits intomasterfrom
piotr-rewrite-graph
Feb 4, 2021
Merged

rewrite graph struct to be 200 times faster#3882
near-bulldozer[bot] merged 54 commits intomasterfrom
piotr-rewrite-graph

Conversation

@pmnoxx
Copy link
Contributor

@pmnoxx pmnoxx commented Feb 2, 2021

It looks like it's possible to rewrite graph class to be 200 times faster. Do we really need to move computation to another thread?

@pmnoxx pmnoxx force-pushed the piotr-rewrite-graph branch 2 times, most recently from efaa44b to 2888a01 Compare February 2, 2021 14:09
@pmnoxx pmnoxx self-assigned this Feb 2, 2021
@pmnoxx pmnoxx linked an issue Feb 2, 2021 that may be closed by this pull request
@pmnoxx pmnoxx marked this pull request as ready for review February 2, 2021 14:19
@pmnoxx pmnoxx requested a review from mfornet as a code owner February 2, 2021 14:19
@pmnoxx pmnoxx changed the title rewrite graph struct to be 25 times faster rewrite graph struct to be 36 times faster Feb 2, 2021
@pmnoxx pmnoxx force-pushed the piotr-rewrite-graph branch 3 times, most recently from 2921ebd to 4a2c741 Compare February 2, 2021 15:07
@pmnoxx pmnoxx marked this pull request as draft February 2, 2021 15:09
@pmnoxx pmnoxx marked this pull request as ready for review February 2, 2021 15:10
@pmnoxx pmnoxx requested a review from matklad February 2, 2021 20:07
@pmnoxx pmnoxx force-pushed the piotr-rewrite-graph branch from 7a63251 to e704db0 Compare February 2, 2021 20:40
@pmnoxx pmnoxx marked this pull request as draft February 2, 2021 22:14
@pmnoxx pmnoxx force-pushed the piotr-rewrite-graph branch from 0696882 to b022a42 Compare February 2, 2021 23:06
@pmnoxx pmnoxx force-pushed the piotr-rewrite-graph branch 5 times, most recently from d504147 to 928af46 Compare February 3, 2021 00:55
@pmnoxx pmnoxx requested a review from bowenwang1996 February 3, 2021 00:57
@pmnoxx pmnoxx marked this pull request as ready for review February 3, 2021 00:57
@pmnoxx pmnoxx changed the title rewrite graph struct to be 36 times faster rewrite graph struct to be 100 times faster Feb 3, 2021
Copy link
Contributor

@matklad matklad left a comment

Choose a reason for hiding this comment

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

Mostly nits, but total_active_edges seems like it might affect correctness.

Also, 100X perf improvement is nice :D

Also, I am wondering, does it make sense to try petgraph here? Although I myself also actually prefer to code simple graph routines myself.

@pmnoxx pmnoxx force-pushed the piotr-rewrite-graph branch from 0029d8c to aa5b63f Compare February 4, 2021 15:50
Copy link
Collaborator

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

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

looks good to me. @mfornet can you also review?

@pmnoxx pmnoxx requested a review from matklad February 4, 2021 16:17
@near-bulldozer near-bulldozer bot merged commit 833e230 into master Feb 4, 2021
@near-bulldozer near-bulldozer bot deleted the piotr-rewrite-graph branch February 4, 2021 18:10
bowenwang1996 pushed a commit that referenced this pull request Feb 18, 2021
It looks like it's possible to rewrite graph class to be 200 times faster. Do we really need to move computation to another thread?
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.

Update routing table in a separate thread

3 participants