Skip to content

enhance(perfomance): add rustworkx adapter implementation, benchmark suite, and unit tests#398

Open
dipanjannC wants to merge 1 commit intosafishamsi:v4from
dipanjannC:v4
Open

enhance(perfomance): add rustworkx adapter implementation, benchmark suite, and unit tests#398
dipanjannC wants to merge 1 commit intosafishamsi:v4from
dipanjannC:v4

Conversation

@dipanjannC
Copy link
Copy Markdown

Quantitative benchmark snapshot

Performance Comparison: NetworkX vs rustworkx

Graph Size Build: NetworkX Build: rustworkx Build Ratio BFS: NetworkX BFS: rustworkx Shortest Path: NetworkX Shortest Path: rustworkx
1,000 nodes 17.46 ms 10.25 ms 1.70× faster 0.008 ms 0.026 ms 0.336 ms 0.384 ms
5,000 nodes 81.97 ms 63.09 ms 1.30× faster 0.007 ms 0.016 ms 0.309 ms 1.220 ms

Summary

  • Graph construction: rustworkx is consistently faster (1.3×–1.7×)
  • BFS traversal: NetworkX performs better in these cases
  • Shortest path:
    • Comparable at smaller scale (1K nodes)
    • NetworkX significantly faster at 5K nodes

P.S. - Let me know if any changes you want to have.

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.

1 participant