PyData Global 2022

100x Faster NetworkX: Dispatching to GraphBLAS
12-02, 19:00–19:30 (UTC), Talk Track I

NetworkX is the most popular graph/network library in Python. It is easy to use, well documented, easy to contribute to, extremely flexible, and extremely slow for large graphs.
An upcoming release begins to fix that last issue by calling fast GraphBLAS implementations instead of the native Python implementation.

If you use NetworkX or have ever written a graph algorithm, this talk will be of interest to you as it shows how NetworkX is planning on a path of pluggable algorithm libraries so users can opt-in to faster implementations with minimal code changes.


NetworkX is extremely popular (4M downloads/week on PyPI) and is the usual entry point for Python users beginning their journey of network and graph analysis. The documentation is superb, tutorials exist, the API is stable. It is a fantastic library until it isn’t… and that point usually happens when attempting to analyze large graphs.

Because it is written in pure Python using a dict-of-dicts model, performance is orders of magnitude slower than highly tuned C/C++ libraries. However, while other libraries may be fast, they lack the useability and community of NetworkX.

One of these highly tuned libraries is python-graphblas which uses linear algebra to write elegant, yet highly efficient graph algorithms. A brief overview of GraphBLAS will be given.

This talk will showcase calling the NetworkX API with a GraphBLAS object instead of a NetworkX Graph. This will automatically dispatch to the matching GraphBLAS implementation, resulting in an impressive speedup.

We will also show how authors of other graph libraries can integrate with NetworkX and achieve similar results.

This is an experimental feature. We hope to get feedback from the community to continue making NetworkX even better.


Prior Knowledge Expected

No previous knowledge expected

Jim Kitchen is a Sr. Software Engineer at Anaconda, focused on graph analytics and sparse data. He is a member of the GraphBLAS C API committee and is an author of the python-graphblas library.

I work on open-source at NVIDIA, including Dask, GraphBLAS and python-graphblas, NetworkX, RAPIDS (cudf, cugraph), toolz, afar, etc.

I am currently working on the NetworkX open source project (work funded through a grant from Chan Zuckerberg Initiative!) Also collaborating with folks from the Scientific Python project (Berkeley Institute of Data Science), Anaconda Inc and GESIS, Germany. Before this I used to work on the GESIS notebooks and gesis.mybinder.org.
I am also interested in the development and maintenance of the open source data & science software ecosystem. I try to help around with the broader Scientific Open Source ecosystem wherever possible. To share my love of Python and Network Science, I have presented workshops at multiple conferences like PyCon US, SciPy US, PyData London and many more!