3 ms·
I believe this article is taking about small objects allocation (which presumably happens quite frequently in a language like python). > To reduce overhead for
by yzmtf2008 7y ago
I believe this article is taking about small objects allocation (which presumably happens quite frequently in a language like python).
> To reduce overhead for small objects (less than 512 bytes) Python sub-allocates big blocks of memory. Larger objects are routed to standard C allocator. Small object allocator uses three levels of abstraction — arena, pool, and block.
- saagarjha 7y agoBut most system allocators have affordances for small allocations, using techniques such as binning. Is that not good enough for Python?
- fulafel 7y agoI don't know if there's a concise summary of the decisions but you can follow the trail of discussions and benchmarks in these links: https://bugs.python.org/issue26249 https://bugs.python.org/issue26249 https://mail.python.org/pipermail/python-dev/2016-February/143084.html https://mail.python.org/pipermail/python-dev/2016-February/1...