Hacker News new | past | comments | ask | show | jobs | submit login

The other answers are good (it takes O(n^2) time just to read two matrices, so you can't possibly multiply them more quickly than that), but they leave out a critical part of that analysis that I want to highlight just in case it would have otherwise bitten you in the future:

You _do_ actually have to read all the entries in both matrices -- if you know K-1 out of K values then in general you still can't uniquely compute the output of matrix multiplication. Consequently, any algorithm relying on only some subset of the entries is at best an approximation.

If you have more information (e.g., that one or both of the matrices is sufficiently sparse) then you can potentially do better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: