MATLAB: About parfor and spmd speedup

MATLAB Parallel Serverparallel computing

hi,
I have tested the speedup of parfor and spmd as
1)for
tic
for n=1:1000
A=B*C;
end
toc;
2)parfor spmd in one worker in the same pc:
// I have stored B C in the worker before computing
tic
parfor n=1:1000
A=B*C;
end
toc;
I find that the speed of parfor and spmd is only 2/3 of single matlab. is it possible to make it faster?

Best Answer

If your matrices are not very big, then the time required to set up workers and communicate data in to them can overwhelm any saving of using multiple workers.