Skip to content

question about the algorithm #2

Open

Description

@xlqqqqq

Why does it show that Dijkstra is faster than Barrier after I run the demo.py file? I also come in to test like the Quick Start section, randomly generated a map with 10,000 nodes and 40,000 edges, and the test results showed that Dijkstra is still faster. The test.py file contains my testing process, where did I go wrong?

test.py

Activity

  1. arman0z commented on Nov 24, 2025

    @arman0z
    Owner

    This is actually the expected behavior.

    The algorithm is designed for very large graphs (100k+ nodes). On your 10,000-node test, Dijkstra is faster because it has lower overhead.

    I just pushed fixes that disables the advanced features on smaller graphs and matches Dijkstra's performance. The theoretical O(m log^(2/3) n) advantage only shows up on massive graphs where the asymptotic improvement outweighs the implementation overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions