speeds up matrixbuilder sorting by packing…

rows and cols into a single long