[Numpy-discussion] Aligned / configurable memory allocation

Nathaniel Smith njs at pobox.com
Tue Feb 10 14:26:22 EST 2015


On 10 Feb 2015 09:11, "Antoine Pitrou" <solipsis at pitrou.net> wrote:
>
>
> Hello,
>
> I apologize for pinging the list, but I was wondering if there was
> interest in either of https://github.com/numpy/numpy/pull/5457 (make
> array data aligned by default) or
> https://github.com/numpy/numpy/pull/5470 (make the array data allocator
> configurable)?

I'm not a fan of the configurable allocator. It adds new public APIs for us
to support, and makes switching to using Python's own memory allocation
APIs more complex. The feature is intrinsically dangerous, because newly
installed deallocators must be able to handle memory allocated by the
previous allocator. (AFAICT the included test case can crash the test
process if you get unlucky and GC runs during it?). And no one's
articulated any compelling argument for why we need this configurability.

Regarding the aligned allocation patch, I think the problem is just that
none of us have any way to evaluate it. I'd feel a lot more comfortable
with some solid numbers showing the costs and benefits on old and new
systems.

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150210/56ef4c99/attachment.html>


More information about the NumPy-Discussion mailing list