Deal with dense matrix
Performance comparison