Why is a naïve C++ matrix multiplication 100 times slower than BLAS?

后端 未结 5 1389
我寻月下人不归
我寻月下人不归 2020-12-25 09:17

I am taking a look at large matrix multiplication and ran the following experiment to form a baseline test:

  1. Randomly generate two 4096x4096 matrixes X, Y from
5条回答
  •  别那么骄傲
    2020-12-25 09:25

    I don't know how reliable the information is but Wikipedia says that BLAS uses Strassen's algorithm for big matrixes. And yours are big indeed. That is around O(n^2.807) which is better than your O(n^3) naïve alogrithm.

提交回复
热议问题