[issue26382] List object memory allocator

2017-02-20 Thread STINNER Victor
STINNER Victor added the comment: FYI the Python 3.6 change in PyMem_Malloc() required to implement a new complex check on the GIL. Search for "PyMem_Malloc() now fails if the GIL is not held" in my following blog post: https://haypo.github.io/contrib-cpython-2016q1.html Requiring that the GIL

[issue26382] List object memory allocator

2017-02-20 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue26382] List object memory allocator

2016-12-29 Thread INADA Naoki
INADA Naoki added the comment: OK. I didn't know PyMem and PyObject allocators are always same. No reason to change Python 3. How about Python 2? Off topic: I want to know which of PyMem and PyObject allocator is preferred when writing new code. -- versions: -Python 3.7 __

[issue26382] List object memory allocator

2016-12-29 Thread STINNER Victor
STINNER Victor added the comment: I know PyMem and PyObject allocator is same by default. But it's configurable. How should I choose right allocator? The two functions always use the same allocator: https://docs.python.org/dev/using/cmdline.html#envvar-PYTHONMALLOC Sorry but which issue are you

[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki
INADA Naoki added the comment: Maybe, PyObject_MALLOC remains only for backward compatibility? -- ___ Python tracker ___ ___ Python-bu

[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki
INADA Naoki added the comment: I know PyMem and PyObject allocator is same by default. But it's configurable. How should I choose right allocator? -- ___ Python tracker ___ _

[issue26382] List object memory allocator

2016-12-28 Thread STINNER Victor
STINNER Victor added the comment: See https://bugs.python.org/issue26249 -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue26382] List object memory allocator

2016-12-28 Thread STINNER Victor
STINNER Victor added the comment: Il don't understand your change: in Python 3.6, PyMem now uses exactly the same allocator than PyObject. -- ___ Python tracker ___ _

[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46066/listobject_CPython3-2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki
INADA Naoki added the comment: Update patch for Python 2.7 -- nosy: +inada.naoki versions: +Python 3.7 -Python 3.6 Added file: http://bugs.python.org/file46063/listobject_CPython2-2.patch ___ Python tracker ___

[issue26382] List object memory allocator

2016-02-22 Thread Catalin Gabriel Manciu
Catalin Gabriel Manciu added the comment: Our Haswell-EP OpenStack Swift setup shows a 1% improvement in throughput rate using CPython 2.7 (5715a6d9ff12) with this patch. -- ___ Python tracker

[issue26382] List object memory allocator

2016-02-19 Thread STINNER Victor
STINNER Victor added the comment: Terry J. Reedy added the comment: > My impression is that we do not do such performance enhancements to 2.7 for > the same reason we would not do them to current 3.x -- the risk of breakage. > Have I misunderstood? Breakage of what? The change looks very safe

[issue26382] List object memory allocator

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: My impression is that we do not do such performance enhancements to 2.7 for the same reason we would not do them to current 3.x -- the risk of breakage. Have I misunderstood? -- nosy: +terry.reedy ___ Python tracke

[issue26382] List object memory allocator

2016-02-19 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : -- nosy: +alecsandru.patrascu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26382] List object memory allocator

2016-02-19 Thread STINNER Victor
STINNER Victor added the comment: "Theoretically, an object type that consistently allocates more than the small object threshold would perform a bit slower because it would first jump to the small object allocator, do the size comparison and then jump to malloc." I expect that the cost of the

[issue26382] List object memory allocator

2016-02-19 Thread Catalin Gabriel Manciu
Catalin Gabriel Manciu added the comment: Theoretically, an object type that consistently allocates more than the small object threshold would perform a bit slower because it would first jump to the small object allocator, do the size comparison and then jump to malloc. There would be a small o

[issue26382] List object memory allocator

2016-02-19 Thread STINNER Victor
STINNER Victor added the comment: Catalin Gabriel Manciu: "(...) allowing us to have finer control over the new areas where we enable allocating using the small object allocator and detect where this replacement might be detrimental to the performance" Ah, interesting, do you think that it's pos

[issue26382] List object memory allocator

2016-02-19 Thread Catalin Gabriel Manciu
Catalin Gabriel Manciu added the comment: Hi Victor, This patch follows the same idea as your proposal, but it's focused on a single object type. I think doing this incrementally is the safer approach, allowing us to have finer control over the new areas where we enable allocating using the s

[issue26382] List object memory allocator

2016-02-18 Thread Florin Papa
Changes by Florin Papa : -- nosy: +florin.papa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue26382] List object memory allocator

2016-02-18 Thread STINNER Victor
STINNER Victor added the comment: Instead of modifying individual files, I proposed to modify PyMem_Malloc to use PyObject_Malloc allocator: issue #26249. But the patch for Python 2 still makes sense. -- nosy: +haypo ___ Python tracker

[issue26382] List object memory allocator

2016-02-18 Thread Catalin Gabriel Manciu
Changes by Catalin Gabriel Manciu : Added file: http://bugs.python.org/file41954/listobject_CPython2.patch ___ Python tracker ___ ___ Python-b

[issue26382] List object memory allocator

2016-02-18 Thread Catalin Gabriel Manciu
New submission from Catalin Gabriel Manciu: Hi All, This is Catalin from the Server Scripting Languages Optimization Team at Intel Corporation. I would like to submit a patch that replaces the 'malloc' allocator used by the list object (Objects/listobject.c) with the small object allocator (o