We are writing an application in which some parts are meant to be in parallel. Nevertheless, we want to tune the app so that it uses the optimal number of cores (even if the number of cores = 1)
My question is: what happens with the speed of execution for these two blocs
parfor i = 1:X executeYendfor i = 1:X executeYend
when only one core is being used, keeping everything else constant? Is the parfor slower because it checks if a matlabpool is open? Is the speed of execution the same for both?
Best Answer