Use arrays instead of HashMaps in sparse matrices.
Merge upstream changes.
Use arrays instead of HashMaps in sparse matrices.