-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add parallelism to cloness_centrality
#1392
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 13946980567Details
💛 - Coveralls |
Because #1387, I added a test to boost the coverage in the report. I am confident the Rust tests guarantee the correctness so for now that is a stop gap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, it makes a lot of sense to run this with rayon. Thanks for doing this. I just left a couple of comments inline the main one is I think we can do this without a mutex using a rayon iterator collection into the vec which should be faster..
This PR makes
closeness_centrality
andnewman_weighted_closeness_centrality
parallel for better performance. This is possible because the task is embarrassingly parallel.We probably missed this in #593 but #1385 reminded me of it.
The parallelism is toggled via the
parallel_threshold
just like other centrality methods.