'performance of calculating pearson coefficient of one vector with n vectors

I have one vector x, and n vectors Y (n>=10,000,000)

Each vector is of size 4000

Now it needs to get corr(x, yi), obviously the result is of size n

If each corr is calculated one by one, it takes a lot of time and can not be finished in 1 min. Matlab provides an efficient way to get corr matrix for nxn matrix, but in my laptop the n is limited <20000.

So is there a way or tool to complete this task within 1 min?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source