title: F#: Tell me what I'm missing about using Async.Parallel
body: <p>ok, so I'm doing ProjectEuler Problem #14, and I'm fiddling around with optimizations in order to feel f# out.</p>
  
  <p>in the following code:</p>
  
  <pre><code>let evenrule n = n / 2L
  let oddrule n = 3L * n + 1L
  
  let applyRule n =
      if n % 2L = 0L then evenrule n
      else oddrule n
  
  let runRules n =
      let rec loop a final =
          if a = 1L then final
          else loop (applyRule a) (final + 1L)
      n, loop (int64 n) 1L
  
  
  let testlist = seq {for i in 3 .. 2 .. 1000000 do yield i } 
  
  let getAns sq = sq |&gt; Seq.head
  
  let seqfil (a,acc) (b,curr) = if acc = curr then (a,acc) else if acc &lt; curr then (b,curr) else (a,acc)
  
  let pmap f l = 
      seq { for a in l do yield async {return f a} }
      |&gt; Seq.map Async.RunSynchronously
  
  let pmap2 f l = 
      seq { for a in l do yield async {return f a} }
      |&gt; Async.Parallel
      |&gt; Async.RunSynchronously
  
  let procseq f l = l
                    |&gt; f runRules
                    |&gt; Seq.reduce seqfil
                    |&gt; fst
  
  let timer = System.Diagnostics.Stopwatch()
  timer.Start()
  let ans1 = testlist |&gt; procseq Seq.map // 837799    00:00:08.6251990
  printfn "%A\t%A" ans1 timer.Elapsed
  timer.Reset()
  
  timer.Start()
  let ans2 = testlist |&gt; procseq pmap
  printfn "%A\t%A" ans2 timer.Elapsed // 837799   00:00:12.3010250
  timer.Reset()
  
  timer.Start()
  let ans3 = testlist |&gt; procseq pmap2
  printfn "%A\t%A" ans3 timer.Elapsed // 837799   00:00:58.2413990
  timer.Reset()
  </code></pre>
  
  <p>Why does the Async.Parallel code run REALLY slow in comparison to the straight up map?  I know I shouldn't see that much of an effect, since I'm only on a dual core mac.</p>
  
  <p>Please note that I do NOT want help solving problem #14, I just want to know what's up with my parallel code.</p>