parallel computing speed question when the body of the parfor loop takes about 2 seconds
Afficher commentaires plus anciens
I have a question about parallel:
parfor ii=1:N dosomething%% end
in the parfor loop, the time of dosomething is 2 seconds in each loop, and N is about 100. In that condition, is it efficient to use parfor here???
I feel confused about that as I test the time and find the more core I use, the more time I spend!!!!!! Could someone help to answer this question?!!!!
Réponse acceptée
Plus de réponses (1)
Guanfeng Gao
le 13 Mai 2015
0 votes
1 commentaire
Walter Roberson
le 13 Mai 2015
Are the matrices large? If so then you might be encountering a lot of overhead in transmitting the values back. Try experimenting with drange() instead of parfor()
Catégories
En savoir plus sur Parallel for-Loops (parfor) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!