Iterating over the edges fast
Hello everyone, I am a NetworkX user thinking on moving to graph-tools. I developed some basic Vehicle routing algorithms in Networkx some time ago, but iterating throw the edges was so slow that medium size problems where really unattainable. (more than 50 nodes) I want to know if graph-tools is faster iterating throw nodes. This kind of label-setting algorithms need to go node by node and edge by edge constructing routes, and the "for" in python is really 'lagging'. Should I try the same in graph-tools? thanks in advance. Thomas -- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 03/25/2014 04:29 PM, Thomas Capelle wrote:
Hello everyone, I am a NetworkX user thinking on moving to graph-tools. I developed some basic Vehicle routing algorithms in Networkx some time ago, but iterating throw the edges was so slow that medium size problems where really unattainable. (more than 50 nodes) I want to know if graph-tools is faster iterating throw nodes. This kind of label-setting algorithms need to go node by node and edge by edge constructing routes, and the "for" in python is really 'lagging'. Should I try the same in graph-tools?
If your code relies solely on loops implemented in Python, there will essentially be no difference between graph-tool and networkx. You will only obtain improvements if the relevant loops are implemented in C++. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
Thomas Capelle -
Tiago de Paula Peixoto