Improved efficiency of sparse dot product and sparsedataset