-
Notifications
You must be signed in to change notification settings - Fork 20
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 BFS/DFS traversal for directed, as well as undirected graphs #127
base: main
Are you sure you want to change the base?
Conversation
Hey @regexident Thanks for the PR. I will have a look at it within the next two weeks. |
@s1ck thanks! Disclaimer: I haven't yet had the time to thoroughly look into #107, but will try to find some time for that in the meanwhile. While I'm fairly experienced in the implementation of efficient low-level algorithms/data structures I haven't been following the latest graph algorithm developments for a while. To give some context to this PR: I need a bunch of additional algorithms (traversal, clustering, centrality, …) for |
@regexident Hey! Sorry for the late reply, I just didn't find time, yet. Could you please rebase the PR, I got rid of clippy and rustc warnings that pollute the checks with errors. Everything that fails after that should be due to errors on your branch. |
@regexident I went over the code. I like it in general, however, adding single-threaded algorithms does not really fit into the idea of this project. We initially wrote it as a benchmark to compare with our Java implementation. The idea back then was to port our (parallel) Java implementations to Rust and compare the performance / memory allocations etc. Since there are other Rust libraries out there, that offer single threaded (text book) graph algos, we want to stick to adding parallel algorithms that scale nicely with available cores and graph sizes. One option I can think of to bring this code in is having a separate crate for single threaded algos that sits on top of If you are still interested in contributing a BFS, I suggest having a look into our parallel BFS implementation over in Java land. It is based on the idea of delta stepping, which we initially added in this project, ported it to java and generalized it for unweighted graphs. That would be a great addition to the project! Since you asked about MSBFS .. there is no real reason that we closed the PR except .. time :) Also, the idea with MSBFS (which we also implemented in Java) is to get closer to the original C++ implementation by using proper SIMD and go beyond 64 concurrent searches (which is our limitation in Java due to |
That's an interesting idea. A "textbook/simple" algo implementation crate to explore the API and have a number of various implementations that don't need to adhere to the "high performace/scaling up" requirement. |
I needed traversal support for
graph
for a project and figured I might as well open a PR for it, once finished.I noticed that you had already done work on MS-BFS before, yet later abandoned it? Could say a bit about why you abandoned that PR? When looking for existing benchmarks (to some for traversals) I noticed that that PR was the only place with benchmarks. Would it make sense to pull that stuff out in a PR of its own?
(I couldn't find a
CONTRIBUTING
file, nor any other contribution guidance with regards to what kind if implementations and level of optimizations you'd expect for PRs on this crate, given its declared focus on performance and scalability.)