'is there a better function than 'computeSVD()' that uses mapreduce in term of execution time?

I used the function computeSVD() and i used a large matrix on it and the execution time is so long comparing to a function that normaly use mapreduce which normaly makes the execution time better. i compared these two functions:

start_time = time.time()
number_of_documents=200
L,S,R=np.linalg.svd(X)  <--- don't use mapreduce

exemple_three = time.time() - start_time
print("---Exemple three : %s seconds ---" % (exemple_three))
output:
---Exemple three : 5.322664976119995 seconds ---

and the second one computeSVD()

start_time = time.time()

number_of_documents=200
svd = mat.computeSVD(5, computeU=True)  <--- use mapreduce

exemple_two = time.time() - start_time
print("---Exemple one : %s seconds ---" % (exemple_two))
output:
---Exemple one : 252.04261994361877 seconds ---

my goal is a similar function that uses mapreduce



Sources

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

Source: Stack Overflow

Solution Source