10000 bpo-32346: speed up slot lookup during class creation by pitrou · Pull Request #4902 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-32346: speed up slot lookup during class creation #4902

10000
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

Closed
wants to merge 9 commits into from

Conversation

pitrou
Copy link
Member
@pitrou pitrou commented Dec 16, 2017

Instead of looking up every possible slot in every class along the MRO (generating possibly hundreds of dict lookups), cache the known descriptors of each type so that finding them again is simply a matter of walking a tuple.

https://bugs.python.org/issue32346

Instead of looking up every possible slot in every class along the MRO
(generating possibly hundreds of dict lookups), cache the known descriptors
of each type so that finding them again is simply a matter of walking
a tuple.
@pitrou
Copy link
Member Author
pitrou commented Jan 2, 2018

@serhiy-storchaka, is there any chance you might give this a look so 8000 on?

@serhiy-storchaka
Copy link
Member

Sure. I was busy due to working on the compiler, but the hardest work is already done, and I have now more free time.

@pitrou pitrou requested a review from 1st1 as a code owner January 4, 2018 13:38
@pitrou pitrou force-pushed the speedup_type_creation branch from 6298f68 to 694e1b0 Compare January 4, 2018 13:44
@pitrou
Copy link
Member Author
pitrou commented Jan 15, 2018

Rejected because of memory and GC overhead: see https://bugs.python.org/issue32346

@pitrou pitrou closed this Jan 15, 2018
@pitrou pitrou deleted the speedup_type_creation branch January 15, 2018 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0