Hi Pauli,<br><br>
<div class="gmail_quote">On Thu, Feb 10, 2011 at 8:31 PM, Pauli Virtanen <span dir="ltr"><<a href="mailto:pav@iki.fi">pav@iki.fi</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Thu, 10 Feb 2011 12:16:12 -0600, Robert Kern wrote:<br>[clip]<br>
<div class="im">> One thing that might be worthwhile is to make<br>> implementations of sum() and cumsum() that avoid the ufunc machinery and<br>> do their iterations more quickly, at least for some common combinations<br>
> of dtype and contiguity.<br><br></div>I wonder what is the balance between the iterator overhead and the time<br>taken in the reduction inner loop. This should be straightforward to<br>benchmark.<br><br>Apparently, some overhead decreased with the new iterators, since current<br>
Numpy master outperforms 1.5.1 by a factor of 2 for this benchmark:<br><br>In [8]: %timeit M.sum(1)     # Numpy 1.5.1<br>10 loops, best of 3: 85 ms per loop<br><br>In [8]: %timeit M.sum(1)     # Numpy master<br>10 loops, best of 3: 49.5 ms per loop<br>
<br>I don't think this is explainable by the new memory layout optimizations,<br>since M is C-contiguous.<br><br>Perhaps there would be room for more optimization, even within the ufunc<br>framework?</blockquote>
<div>I hope so. Please suggest if there's anything that I can do to further advance this. (My C skills are allready bit rusty, but at any higher level I'll try my best to contribute).</div>
<div> </div>
<div> </div>
<div>Thanks,</div>
<div>eat</div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>--<br><font color="#888888">Pauli Virtanen<br></font>
<div>
<div></div>
<div class="h5"><br>_______________________________________________<br>NumPy-Discussion mailing list<br><a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br><a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br>