title: Making itertools.combinations calculations multiprocess in python?
body: <p>I'm using such algorithm to make some calculations on array of Decimals:</p>
  
  <pre><code>fkn = Decimal('0')
  for bits in itertools.combinations(decimals_array, elements_count):
      kxn = reduce(operator.mul, bits, Decimal('1'))
      fkn += kxn
  </code></pre>
  
  <p>I'm using Python 3.4 x64.
  <strong>Decimals have precision>300 (it's a must)</strong>.
  len(decimals_array) is most of the time over 40. 
  elements_count is most of the time len(decimals_array)/2.</p>
  
  <p><strong>Calculations take very long time</strong>.
  I wanted to make them multiprocess so first I was thinking about making an array of all combinations and send parts of this array to many processes - but during making of such array I quickly get MemoryError Exception.</p>
  
  <p>Now I'm looking for nicer way to make this code multiprocess.</p>
  
  <p><strong>What is a good way to run this algorithm on multiple cores?</strong></p>
  
  <p>Or maybe there is a better (faster) way to make such calculations?</p>
  
  <p>Thank you in advance for some ideas.</p>