title: What is the difference between np.sum and np.add.reduce?
body: <p>What is the difference between <code>np.sum</code> and <code>np.add.reduce</code>?<br>
  While <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ufunc.reduce.html">the docs</a> are quite explicit:  </p>
  
  <blockquote>
    <p>For example, add.reduce() is equivalent to sum().</p>
  </blockquote>
  
  <p>The performance of the two seems to be quite different: for relatively small array sizes <code>add.reduce</code> is about twice faster. </p>
  
  <pre><code>$ python -mtimeit -s"import numpy as np; a = np.random.rand(100); summ=np.sum" "summ(a)"
  100000 loops, best of 3: 2.11 usec per loop
  $ python -mtimeit -s"import numpy as np; a = np.random.rand(100); summ=np.add.reduce" "summ(a)"
  1000000 loops, best of 3: 0.81 usec per loop
  
  $ python -mtimeit -s"import numpy as np; a = np.random.rand(1000); summ=np.sum" "summ(a)"
  100000 loops, best of 3: 2.78 usec per loop
  $ python -mtimeit -s"import numpy as np; a = np.random.rand(1000); summ=np.add.reduce" "summ(a)"
  1000000 loops, best of 3: 1.5 usec per loop
  </code></pre>
  
  <p>For larger array sizes, the difference seems to go away:</p>
  
  <pre><code>$ python -mtimeit -s"import numpy as np; a = np.random.rand(10000); summ=np.sum" "summ(a)"
  100000 loops, best of 3: 10.7 usec per loop
  $ python -mtimeit -s"import numpy as np; a = np.random.rand(10000); summ=np.add.reduce" "summ(a)"
  100000 loops, best of 3: 9.2 usec per loop
  </code></pre>