Hacker News new | ask | show | jobs
by rkwz 1303 days ago
NetworkX is widely understood to be slower compared to other graph libraries - you tradeoff performance for ease of use.

How does it compare to igraph, graph-tool etc - https://graph-tool.skewed.de/performance

4 comments

Wait, graph-tool is finally on Python 3? I loved graph-tool. Even did a conference talk on it once. But for years it was Python 2.7 only, so much that I finally gave up on ever using it again.

For me, NetworkX is good for exploration, but shouldn't be used for anything serious in production. Once you sorta figure out what you want to do there are so many other things you should use before NetworkX that may take longer to get the data in, and may be more annoying to query, but are ultimately more suited to the task.

It's hard to even compare these different tools directly because they solve different problems. For example, if data integrity was paramount I'd just use Postgres and recursive querying / intelligent partitioning. If speed were important, Memgraph or sparse matrices in Numpy. If the data were large documents with tag like relationships, some sort of document store (used Riak last time around, but that was over ten years ago).

similarly, see also the benchmarks in https://www.timlrx.com/blog/benchmark-of-popular-graph-netwo...

those benchmarks measure the julia lightgraphs library computing pagerank 429x to 26x faster than networkx, on larger graphs than the one featured in this advertisement.

Yeah, but this is not an official benchmark, it’s just a simple demo on sample dataset. It would take much more effort to create the whole benchmark to prove how much exactly Memgraph is faster and on what kind of workload.
But again, thanks for sharing. This is also a valuable resource and reference for future comparisons.
Yes, I agree. I read this comparison in performance, it's a really good resource, thanks for sharing. It all depends on what are your needs of course. But C++ implementation of graph-tool definitely wins the battle.
This.

I made a mistake in using networkx in my research extensively. Eventually, I discovered performance issues and learned that networkx is much slower than alternatives (as much as an order of magnitude slower!).