title: Optimal way to compute permutations in julia
body: <p>Consider a list <code>[1,1,1,...,1,0,0,...,0]</code> (an arbitrary list of zeros and ones). We want the whole possible permutations in this array, there'll be <code>binomial(l,k)</code> permutations (<code>l</code> stands for the length of the list and <code>k</code> for the number of ones in the list).</p>
  
  <p>Right now, I have tested three different algorithms  to generate the whole possible permutations, one that uses a recurrent function, one that calculates 
  the permutations via calculating the interval number <code>[1,...,1,0,0,...,0]</code>
  to <code>[0,0,...0,1,1,...,1]</code> (since this can be seen as a binary number interval), and one that calculates the permutations using lexicographic order.</p>
  
  <p>So far, the first two approaches fail in performance when the permutations are
  approx. 32. The lexicographic technique works still pretty nice (only a few miliseconds to finish).</p>
  
  <p>My question is, specifically for julia, which is the best way to calculate
  permutations as I described earlier? I don't know too much in combinatorics, but I think a descent benchmark would be to generate all permutations from the total <code>binomial(l,l/2)</code></p>