Is there a more memory-efficient way to deal with sparse matrices?