title: Task.Factory.StartNew vs. Parallel.Invoke
body: <p>In my application I execute from couple of dozens to couple of hundreds actions in parallel (no return value for the actions).</p>
  
  <p>Which approach would be the most optimal:</p>
  
  <ol>
  <li><p>Using <code>Task.Factory.StartNew</code> in foreach loop iterating over <code>Action</code> array (<code>Action[]</code>)</p>
  
  <p><code>Task.Factory.StartNew(() =&gt; someAction());</code></p></li>
  <li><p>Using <code>Parallel</code> class where <code>actions</code> is <code>Action</code> array (<code>Action[]</code>)</p>
  
  <p><code>Parallel.Invoke(actions);</code></p></li>
  </ol>
  
  <p>Are those two approaches equivalent? Are there any performance implications?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have performed some performance tests and on my machine (2 CPU 2 Cores each) results seems to be very similar. I am not sure how it is going to look like on other machines like 1 CPU. Also I am not sure (do not know how to test it very accurate way) what is memory consumption.</p>