Speeding up matrix-vector multiplication and exponentiation in Python, possibly by calling C/C++

前端 未结 2 900
清歌不尽
清歌不尽 2021-01-12 16:21

I am currently working on a machine learning project where - given a data matrix Z and a vector rho - I have to compute the value and slope of the

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 17:16

    Numpy is quite optimized. The best you can do is to try other libraries with data of the same size initialized to random (not initialized to 0) and do your own benchmark.

    If you want to try, you can of course try BLAS. You should also give a try to eigen, I personally found it faster on one of my applications.

提交回复
热议问题