To scan a 1k dimensional matrix, parallel for is faster than simple for loop?
Show older comments
I need to scan a very huge matrix 15k x 10 x 1k
do you think parrallel-for is faster than simple for in this case? in a smaller matrix tic-toc says they are more or less the same.
Is there any fast way to go through a huge matrix elment by element?
2 Comments
Stephen23
on 14 Mar 2023
"I need to scan a very huge matrix 15k x 10 x 1k"
What does "scan" mean? Such an array requires around 1.2 GB, which is not so large these days.
"do you think parrallel-for is faster than simple for in this case?"
I would not expect that, given the extra overhead in setting up a parallel loop, transferrring the data, etc. Whether there is a benefit to using parallel execution depends on many factors:
"Is there any fast way to go through a huge matrix elment by element?"
That depends mostly on what is happening inside the loop, which you have not told us.
Zahra Yousefi Darani
on 14 Mar 2023
Edited: Jan
on 14 Mar 2023
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!