[graph-tool] Iterating over the edges fast

Tiago de Paula Peixoto tiago at skewed.de
Wed Mar 26 20:20:27 CET 2014

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++.


Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20140326/01bcd891/attachment.asc>

More information about the graph-tool mailing list