I wanted to see how the new Tsinghua shortest path algorithm performs against Dijkstra's & Bellman-Ford algorithms.
- Yes, this repo used AI (specifically Claude Sonnet-4), so go easy on me if there's anything wrong. This was just meant to be a fun test.
To run the app (python3 required),
cd src
python3 main.py
--- Performance Analysis ---
This will test algorithms on graphs of increasing size.
Testing with 50 nodes...
dijkstra: 0.36 ms
bellman_ford: 0.26 ms
tsinghua: 0.32 ms
Testing with 100 nodes...
dijkstra: 0.87 ms
bellman_ford: 0.89 ms
tsinghua: 0.84 ms
Testing with 200 nodes...
dijkstra: 7.79 ms
bellman_ford: 11.26 ms
tsinghua: 7.95 ms
Testing with 500 nodes...
dijkstra: 10.82 ms
bellman_ford: 15.30 ms
tsinghua: 13.66 ms