Author vstinner
Recipients neologix, njs, pitrou, rhettinger, tim.peters, trent, vstinner, wscullin
Date 2017-01-23.11:15:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485170119.69.0.420958623418.issue18835@psf.upfronthosting.co.za>
In-reply-to
Content
Antoine Pitrou: "Benchmarks and Intel's recommendation show that aligned allocation is actually important for AVX performance, and NumPy depends on CPython providing the right allocation APIs (for integration with tracemalloc): https://github.com/numpy/numpy/issues/5312"

I don't think that NumPy was ever fully integrated with tracemalloc.

Since Python 3.6, NumPy doesn't have to use Python memory allocators to benefit of tracemalloc debugger: I added a new C API to be able to manually track/untrack memory blocks which are not directly allocated by Python, see the issue #26530. I implemented this feature for NumPy, but since I never got any feedback from NumPy, I left the API private.

Moreover, I also added second feature to tracemalloc: it's now possible to track memory allocation in different address spaces. The feature was also designed for NumPy which can allocate memory in the GPU address space. See the issue #26588.

With these new tracemalloc features, I don't think that NumPy can still be used to request this feature in CPython core.

--

Raymond: "A principal use case would be PyObject pointers where we want to keep all or most of the data fields in the same cache line (i.e. the fields for list, tuple, dict, and set objects).

Deques would benefit from having the deque blocks aligned to 64byte boundaries and never crossing page boundaries.  Set entries would benefit from 32byte alignment."

Victor (me!): "Do you have an idea of performance benefit of memory alignment?"

Since Raymond never provided any evidence that a new aligned memory allocator would give a significant speedup, and there issue is inactive for 2 years, I close it.

See also the change 6e16b0045cf1, it seems like Raymond doesn't plan to use this feature anymore.

--

If someone wants this feature, we need good reasons to implement it.
History
Date User Action Args
2017-01-23 11:15:19vstinnersetrecipients: + vstinner, tim.peters, rhettinger, pitrou, trent, njs, neologix, wscullin
2017-01-23 11:15:19vstinnersetmessageid: <1485170119.69.0.420958623418.issue18835@psf.upfronthosting.co.za>
2017-01-23 11:15:19vstinnerlinkissue18835 messages
2017-01-23 11:15:19vstinnercreate