title: What exactly is the difference between @parallel and pmap?
body: <p>As the title states: what exactly is the difference between <code>@parallel</code> and <code>pmap</code>? I don't mean the obvious one's a macro for a loop and the other works on functions, I mean how exactly does their implementation differ and how should I use this knowledge to choose between them?</p>
  
  <p>The reason I ask is that a lot of the applications I write could use either construct: I could write a loop and calculate something with <code>@parallel</code>, or wrap what would have been in the loop into a function and call <code>pmap</code> on that. I have been following the advice of using <code>@parallel</code> for things which are quick to evaluate and <code>pmap</code> for calls where each task takes much longer (as it states in the documentation), but I feel that if I have a better understanding of what it's doing I'd be able to make better choices.</p>
  
  <p>For example: does <code>@parallel</code> divide up the work before evaluating? I noticed that if I run a parallel loop where each inner call takes a random amount of time, <code>@parallel</code> can take a long time because at the end I have very few processes still working. <code>pmap</code> on the same microtests doesn't seem to have this: is <code>pmap</code> re-distributing the work as needed?</p>
  
  <p>Other questions like this all stem from my ignorance of what exactly how <code>pmap</code> differs from <code>@parallel</code>.</p>