I am doing some measurement with TBB. I noticed that the first call to tbb::parallel_for is slow. I thought, this might come from the task scheduler initialization that is executed the first time a tbb algorithm is called. And yes it had an influence but I don't realy understand the behaviour.
before the first call to tbb::parallel_for is made reduces the time needed for the first call to tbb::parallel_for.
However when I insert:
the time for the first call to tbb::parallel_for is even shorter but I couldn't get any speedup during the measurement (further calls to tbb::parallel_for)
Is this behavior explainable and what should I call before the measurements to get meaningful results. The used test file is attached.
Thanks for any hints