Skip to content

ENH: port np.core.overrides to C for speed #12768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 17, 2019

Conversation

charris
Copy link
Member

@charris charris commented Jan 16, 2019

Backport of #12317.

TL,DR: This significantly speeds up dispatch for __array_function__, reducing the overhead down to about 0.7 microseconds for typical cases (vs 2-3 microseconds currently with a pure Python implementation). For functions that handle many arguments (like concatenate), this reduces the overhead of dispatching by something like 100x, i.e., from "makes concatenate 4x slower" to "barely unnoticeable".

@charris charris added this to the 1.16.1 release milestone Jan 16, 2019
@charris charris changed the title Backport 12317 ENH: port np.core.overrides to C for speed Jan 16, 2019
@charris charris merged commit a6e0d0b into numpy:maintenance/1.16.x Jan 17, 2019
@charris charris deleted the backport-12317 branch January 17, 2019 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants