[SciPy-User] numpy.histogram is slow
David Warde-Farley
wardefar at iro.umontreal.ca
Fri Oct 19 16:43:19 EDT 2012
On Thu, Oct 18, 2012 at 4:06 PM, Chris Weisiger <cweisiger at msg.ucsf.edu> wrote:
> On Thu, Oct 18, 2012 at 12:26 AM, Jerome Kieffer <Jerome.Kieffer at esrf.fr> wrote:
>>
>> I implemented a 1D and 2D histogram, weighted and unweighted using cython (>=0.17) in parallel.
>> It is much faster than the one provided by numpy:
>> 4ms vs 25ms in your case on my computer
>> https://github.com/kif/pyFAI/blob/master/src/histogram.pyx
>
> Interesting. Is there any particular reason why this code could not be
> integrated into Numpy itself? A factor-of-6 improvement in speed on
> multi-processor machines is significant.
I don't know if we have the build infrastructure to support OpenMP
robustly across platforms in NumPy yet. That said, it is something I'd
like to see eventually.
David
More information about the SciPy-User
mailing list