Is it possible to preserve the runtime of functions within a parfor loop? Or keep them more consistent?

1 view (last 30 days)
I have a testing script which is used to check the runtime of new code vs old code for some function using a random set of variables.
I would like to perform these runtime tests in parallel, however the act of performing them in parallel affects the runtime. It would be okay if all of the runtimes increase by the same amount, but there doesn't seem to be a clear pattern.
Is there anyway around this?

Answers (1)

Matt J
Matt J on 12 Apr 2019
You would probably have to parallelize them across a cluster, rather than on a single multicore machine.
  1 Comment
Matt Crossan
Matt Crossan on 12 Apr 2019
Hi Matt, thanks for your answer. That is certainly a possibility but one that I’d like to avoid if possible! It may come to that if I can’t find another solution.

Sign in to comment.

Categories

Find more on Loops and Conditional Statements 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!