bitshuffle
bitshuffle copied to clipboard
Expose the `out` parameter to avoid malloc of output array
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.