Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test efficiency of graphblas in straightness #562

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martinfleis
Copy link
Member

This is more of an exploration than anything. I am curious if graphblas_algorithms engine for networkx can help us with our stuff, so I reimplemented straigtness_centrality on top of it. For now only the core part. Using the network from our docs, I am able to get it from 1min 50s down to 17s, which means it is 6.5x faster. There's nothing to shave from our overhead as 98% of time is now spent on all_pairs_bellman_ford_path_length. I was expecting a bit more from this, given the speedups in benchmarks in their Readme are in hundreds, but better than nothing :).

The code for networkx and graphblas is similar but not the same. Networkx-compatible code is possible but much slower than this. So having graphblas as optional dependency (like numba elsewhere in PySAL) would mean having two implementations, which I am not a fan of. But as @jGaboardi pointed out, graphblas is not installable on Apple Silicon under Python 3.12 at the moment. If there'll be delays of this sort, we I am not sure I like depending on it. (Though it is installable from PyPI...).

@martinfleis
Copy link
Member Author

On the installation, python-graphblas switched from noarch to compiled code some time ago but conda-forge is not set to build arm64. Fixing that in conda-forge/conda-forge-pinning-feedstock#5676.

Once the recipe gets rebuilt, the installation should not be an issue any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant