Ask Your Question
2

What makes the use of numpy.matmul with a non-sparse matrix slower?

asked 2023-06-28 05:37:52 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-28 05:44:02 +0000

david gravatar image

The use of numpy.matmul with a non-sparse matrix can be slower because non-sparse matrices require more computation and memory usage. Non-sparse matrices store all the values in the matrix, while sparse matrices only store the non-zero values, resulting in more efficient computation and memory usage. This means that operations on non-sparse matrices can take longer to compute and require more memory to store the matrix. Additionally, operations on non-sparse matrices may require more computer cache misses, resulting in slower performance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-28 05:37:52 +0000

Seen: 11 times

Last updated: Jun 28 '23