Support sparse matrix
Deal with dense matrix
Performance comparison