I have to compute the sum: , where are large column vectors ( dimension is about 10 millions) and κ is about 100 to 200.
My first attempt is , with (a row vector) and denotes the element-wise product.
My second attempt is to use for loop.
Both attempt are still very slow but for loop is slightly faster.
My questions is : Is there any way to compute the sum more efficiently?
Any suggestion would be much appreciated !
Best Answer