The GraphBLAS and LAGraph are sparse matrix optimized libraries for this exact purpose:
https://github.com/DrTimothyAldenDavis/GraphBLAS
https://github.com/GraphBLAS/LAGraph/