title: Optimizing python one-liner
body: <p>I profiled my program, and more than 80% of the time is spent in this one-line function! How can I optimize it? I am running with PyPy, so I'd rather not use NumPy, but since my program is spending almost all of its time there, I think giving up PyPy for NumPy might be worth it. However, I would prefer to use the CFFI, since that's more compatible with PyPy.</p>
  
  <pre><code>#x, y, are lists of 1s and 0s. c_out is a positive int. bit is 1 or 0.
  def findCarryIn(x, y, c_out, bit):
  
      return (2 * c_out +
              bit -
              sum(map(lambda x_bit, y_bit: x_bit &amp; y_bit, x, reversed(y)))) #note this is basically a dot product.
  </code></pre>