MATLAB: Using parfor

parallel computingParallel Computing Toolboxparfor

Hi I successfully implemented a parfor loop in Matlab. However on my computer which has 4 cores I am not getting the improvement in computation time I expected to get. When I go to the task manager and check the CPU usage it rarely goes over 25% which is the same as before the parfor loop What could be the problem?

Best Answer

What kind of problem have you set up using parfor.. a general fact about the Parallel Computing Toolbox is that the parallel tasks have to be pretty intensive/expensive in order for parallelization be effective..
If your computation is trivial then you might not get the speedup you expect.. Not a lot more can be said without looking at what code you have parallelized.
Also, is your machine quad core or a two core hyperthreaded which would show up as 4 virtual cores?
Related Question