8000 ufunc.at (and possibly other methods) slow · Issue #11156 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
ufunc.at (and possibly other methods) slow #11156
Closed
@nschloe

Description

@nschloe

I noticed that in many of my codes, seemingly harmless lines like

numpy.add.at(target, idx, vals)

take a large share of the runtime. I investigated and found that one gets a speed-up of a factor of 40 (!) by simply moving the critical code to C++.

f

(Not sure what's actually done in numpy.ufunc.) I put this into a very simple module, https://github.com/nschloe/fastfunc, so feel free to take some code out of there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0