Skip to content
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

Expose the out parameter to avoid malloc of output array #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kif
Copy link
Contributor

@kif kif commented Oct 13, 2023

This patch offers the user the ability to provide an output buffer for all functions exposed at the Python level. This feature avoids the array creation and permits to recycle explicitly temporary buffers.

Despite the Python memory allocator is supposed to recycle memory in the back of the programmer, it fails sometimes, for example in timeit mode where the garbage collector is disabled. Under such situation the code can becomes terribly slow and causes huge memory leaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant