[Numpy-discussion] poor performance of sum with sub-machine-word integer types

2011-06-21 Thread Zachary Pincus
Hello all, As a result of the fast greyscale conversion thread, I noticed an anomaly with numpy.ndararray.sum(): summing along certain axes is much slower with sum() than versus doing it explicitly, but only with integer dtypes and when the size of the dtype is less than the machine word. I

Re: [Numpy-discussion] poor performance of sum with sub-machine-word integer types

2011-06-21 Thread Charles R Harris
On Tue, Jun 21, 2011 at 10:46 AM, Zachary Pincus zachary.pin...@yale.eduwrote: Hello all, As a result of the fast greyscale conversion thread, I noticed an anomaly with numpy.ndararray.sum(): summing along certain axes is much slower with sum() than versus doing it explicitly, but only with

Re: [Numpy-discussion] poor performance of sum with sub-machine-word integer types

2011-06-21 Thread Keith Goodman
On Tue, Jun 21, 2011 at 9:46 AM, Zachary Pincus zachary.pin...@yale.edu wrote: Hello all, As a result of the fast greyscale conversion thread, I noticed an anomaly with numpy.ndararray.sum(): summing along certain axes is much slower with sum() than versus doing it explicitly, but only with

Re: [Numpy-discussion] poor performance of sum with sub-machine-word integer types

2011-06-21 Thread Charles R Harris
On Tue, Jun 21, 2011 at 11:17 AM, Keith Goodman kwgood...@gmail.com wrote: On Tue, Jun 21, 2011 at 9:46 AM, Zachary Pincus zachary.pin...@yale.edu wrote: Hello all, As a result of the fast greyscale conversion thread, I noticed an anomaly with numpy.ndararray.sum(): summing along certain

Re: [Numpy-discussion] poor performance of sum with sub-machine-word integer types

2011-06-21 Thread Zachary Pincus
On Jun 21, 2011, at 1:16 PM, Charles R Harris wrote: It's because of the type conversion sum uses by default for greater precision. Aah, makes sense. Thanks for the detailed explanations and timings! ___ NumPy-Discussion mailing list