This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Semi-sparse matrices

Tags: None
(comma "," separated)
matthewlai
Registered Member
Posts
10
Karma
0

Semi-sparse matrices

Tue Jun 09, 2015 10:17 am
In my application I am doing a lot of matrix multiplications - roughly (256x1500)x(1500x2000).

The second matrix is about 85% zeros.

I tried using sparse matrix for the second matrix, but it became about 2x as slow.

For this level of sparsity, is dense matrix still the way to go? The zeros are more or less evenly distributed. Memory is not a problem.

Thanks!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Semi-sparse matrices

Tue Jun 09, 2015 2:36 pm
I'm not really surprised: dense matrix products fully exploits CPU's power, whereas a sparse representation involves a significant overhead, so 85% of zeros is not sparse enough!
matthewlai
Registered Member
Posts
10
Karma
0

Re: Semi-sparse matrices

Tue Jun 09, 2015 8:24 pm
Ah! That makes sense. Thanks.

Back to dense matrices for me!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]