We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Similar to #80 with likely similar fix. ~25x speedup for graph with 1M vertices/edges in iex for:
g = (Graph.new() |> Graph.add_edges(Enum.map(1..1_000_000, fn i -> {i, 1_000_000 - i} end))) :timer.tc(fn -> Graph.replace_vertex(g, Enum.random(1..1_000_000), 1_000_001) end, :millisecond) # {56, #Graph<type: directed, num_vertices: 999897, num_edges: 1000000>} :timer.tc(fn -> Graph.replace_vertex_old(g, Enum.random(1..1_000_000), 1_000_001) end, :millisecond) # {1399, #Graph<type: directed, num_vertices: 999897, num_edges: 1000000>}
Will add to PR #84 as related issues. Would like someone to double check that I haven't mixed up the in-edges and out-edges definitions.
The text was updated successfully, but these errors were encountered:
fix bitwalker#85 -- replace_vertex inefficient for large graphs
772da75
No branches or pull requests
Similar to #80 with likely similar fix. ~25x speedup for graph with 1M vertices/edges in iex for:
Will add to PR #84 as related issues. Would like someone to double check that I haven't mixed up the in-edges and out-edges definitions.
The text was updated successfully, but these errors were encountered: