How to estimate the runtime of a parfor-loop? Whats wrong with this?

1 Ansicht (letzte 30 Tage)
Mr M.
Mr M. am 18 Dez. 2017
I have a MacBook Pro 2017 with 3,5 GHz Intel Core i7. As I know i7 has 4 cores. I've tried the following example script: https://www.mathworks.com/help/distcomp/parfor.html Elapsed time is 11.989581 seconds with parfor, and 20.450299 seconds with simple for. Why? I expect factor 4 (the number of cores), and not factor 2. I have to set something somewhere to use all cores?

Antworten (0)

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by