performance test of sparse-matrix vector product added #1213
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tried testing mat-vec product performance with SGSparseMatrix and Eigen::SparseMatrix, used same fixed matrix for both with dim 10^6x10^6, with nnz~3^10^6, nz elements are along the diagonal, the first row and the first col.
On my machine the output is (with -O3)
time shogun (s) eigen3 (s)
0 0.940000 0.800000
1 0.940000 0.800000
2 0.940000 0.790000
3 0.940000 0.800000
4 0.940000 0.790000
without -O3, however
time shogun (s) eigen3 (s)
0 1.420000 13.450000
1 1.440000 13.460000
2 1.440000 13.480000
3 1.430000 13.470000
4 1.430000 13.470000