Why use `UseVectorized` and `parsim` instead of `UseParallel` and `sim` with `ga`?
Show older comments
I have found multiple questions here about leverging Parallel Computing Toolbox with ga that involves simulation in the fitness function, and UseVectorized together with parsim in the fitness function is often recommended instead of UseParallel and sim.
I have my code written in to use UseVectorized and parsim, however, I find it time wasteful when ga sometimes call the fitness function with less than nWorkers row of population, then nWorkers - nRows workers will idle and wait for the fitness function to complete.
Does this also happen with UseParallel and sim inplace of UseVectorized and parsim? One problem I can think of when using the former is the simulation cache will have to either be built for every simulation, or have to be copied from somewhere. Is there performance benefit for using the latter?
Accepted Answer
More Answers (0)
Categories
Find more on Object Detection 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!