Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocation of values array in split dicts should use small object allocator. #68836

Closed
markshannon opened this issue Jul 16, 2015 · 5 comments
Closed
Assignees
Labels
easy interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage

Comments

@markshannon
Copy link
Member

BPO 24648
Nosy @vstinner, @larryhastings, @markshannon, @Vgr255, @aniawsz

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/larryhastings'
closed_at = <Date 2016-09-02.11:04:35.312>
created_at = <Date 2015-07-16.20:58:44.176>
labels = ['interpreter-core', 'easy', 'performance']
title = 'Allocation of values array in split dicts should use small object allocator.'
updated_at = <Date 2016-09-02.11:04:35.311>
user = 'https://github.com/markshannon'

bugs.python.org fields:

activity = <Date 2016-09-02.11:04:35.311>
actor = 'vstinner'
assignee = 'larry'
closed = True
closed_date = <Date 2016-09-02.11:04:35.312>
closer = 'vstinner'
components = ['Interpreter Core']
creation = <Date 2015-07-16.20:58:44.176>
creator = 'Mark.Shannon'
dependencies = []
files = []
hgrepos = []
issue_num = 24648
keywords = ['easy']
message_count = 5.0
messages = ['246828', '246831', '272894', '272895', '272896']
nosy_count = 5.0
nosy_names = ['vstinner', 'larry', 'Mark.Shannon', 'abarry', 'aniawsz']
pr_nums = []
priority = 'low'
resolution = 'fixed'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'performance'
url = 'https://bugs.python.org/issue24648'
versions = ['Python 3.6']

@markshannon
Copy link
Member Author

bpo-23601 advocates using the small object allocator for dict-keys objects and the results of tests are good.

Using the small object allocator for dict value-arrays as well seems like the obvious next step.

@markshannon markshannon added interpreter-core (Objects, Python, Grammar, and Parser dirs) easy performance Performance or resource usage labels Jul 16, 2015
@vstinner
Copy link
Member

If it's an optimization, we need benchmarks.

We should also try to modify PyMem allocator to simply be an alias to PyObject allocator. I expect a little speedup. I'm not talking for the specific case of the dict type, but for all Python.

@larryhastings
Copy link
Contributor

Assigning to myself on behalf of "aniawsz". I actually want to assign it to her but for some reason I can't. (Maybe because she doesn't have the commit bit?)

@larryhastings larryhastings self-assigned this Aug 17, 2016
@vstinner
Copy link
Member

In Python 3.6, PyMem_Malloc() is now an alias to PyObject_Malloc(), both functions use the pymalloc allocator: see the issue bpo-26249.

This issue can now be closed.

--

Note: I created the issue bpo-26249 when I saw the good results of the issue bpo-23601. In fact, I had the idea when I wrote tracemalloc, but I chose to defer the idea because some people expected regressions. PYTHONMALLOC=debug should now help to find and debug issues:
https://docs.python.org/dev/whatsnew/3.6.html#pythonmalloc-environment-variable

@Vgr255
Copy link
Mannequin

Vgr255 mannequin commented Aug 17, 2016

One needs to have the "Developer" role (i.e. can triage issues) to be assigned :)

@vstinner vstinner closed this as completed Sep 2, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage
Projects
None yet
Development

No branches or pull requests

3 participants