Introducing metal-graph 0.1.0, a new Python library for fast graph analytics on Apple Silicon Macs.
metal-graph combines a familiar Python interface with optimized native CPU code and GPU acceleration through Apple’s Metal framework. Its goal is simple: make demanding graph workloads faster while keeping computation local and fitting naturally into existing Python workflows.
The first public release includes immutable graph structures, external node ID support, optimized CPU and Metal execution paths, and packaging built specifically for modern arm64 Macs. Getting started takes one command:
pip install metal-graph
This first release includes full-vector PageRank; batched personalized PageRank with top-k retrieval; multi-source, direction-optimizing breadth-first search with dense or sparse output; bounded k-hop neighborhood and ego-subgraph extraction; and experimental weakly connected components.
The early results are exciting. On an M4 Max, metal-graph ran equivalent dense-output BFS on Orkut’s 117-million-edge graph in 8.29 milliseconds, compared with 41.2 seconds for rustworkx - a 4,965× speedup. In the included 1.18-million-edge quickstart benchmark, GPU PageRank was 109× faster than NetworkX, while the CPU path was nearly 60× faster. PageRank reached 614× versus igraph on Orkut, and weakly connected components reached 75.6× versus igraph on a 268-million-edge graph. Batched PPR with top-k achieved a contextual 1,059× speedup over a sequential igraph query loop.
These are workload-specific, warm, end-to-end measurements from one M4 Max - not universal guarantees. The repository publishes the full methodology and clearly identifies comparisons where solver behavior or output representation differs.
metal-graph supports CPython 3.10–3.14 on Apple Silicon Macs running macOS 14 or newer. Install it from PyPI or explore the benchmarks and notebooks in the GitHub repo (link below)