Skip to content
Discussion options

You must be logged in to vote

This is probably not overly helpful, but it usually depends. Let's your rather expensive conversion takes seconds. If the algorithm you want to implement takes seconds itself that overhead might be prohibitive, but if it takes hours then those extra seconds will most likely not matter at all. So this is hard to answer without concrete numbers and experimentation.

Alternative strategies would include wrapping your Rust-side types like rs_graph::Digraph in a custom #[pyclass] so that there is no conversion. But this means that you will have to implement a Python API so that the rest of your Python code can use your custom #[pyclass] instead of networkx.DiGraph which might be a lot of effort…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jaywonchung
Comment options

Answer selected by jaywonchung
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants