 <p>May be unrelated to performance, but the code as it written now has strange parallelization structure.</p> <p>I doubt it can produce correct results, because the <code>while</code> loop inside the <code>parallel</code> does not have barriers (<code>omp master</code> does not have barrier, <code>omp for nowait</code> also does not have barrier). </p> <p>As a result, (1) threads may start <code>omp for</code> loop before the master thread finishes <code>Tree.PreProcessing()</code>, some threads actually may execute <code>omp for</code> any number of times before the master works on single pre-processing step; (2) master may run <code>Tree.PropagatePositions()</code> before other threads finish the <code>omp for</code>; (3) different threads may run different time steps; (4) theoretically the master thread may finish all steps of the <code>while</code> loop before some thread even enters parallel region, and thus some iterations of the <code>omp for</code> loop may be never executed at all.</p> <p>Or am I missing something?</p>