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

add missing tp_as_mapping, tp_as_sequence and tp_as_number functions #1197

Closed
undingen opened this issue May 22, 2016 · 3 comments
Closed

add missing tp_as_mapping, tp_as_sequence and tp_as_number functions #1197

undingen opened this issue May 22, 2016 · 3 comments
Labels
old_v1 Issues leftover from the old v1 series probably easy

Comments

@undingen
Copy link
Contributor

Some of our builtin types don't overwrite all of this functions.
This means the perf will be slightly worse because we will call into the slot wrapper which will than do an attribute lookup instead of just calling the function pointer.
One example is our list type which does not initialize the tp_as_mapping function pointers.
They are therefore initialized to slot_sq_length, etc.. while we should overwrite them with custom implementations like list_length.

@undingen
Copy link
Contributor Author

I added #1198 as an example for such a change.

@sizeoftank
Copy link
Contributor

For example tp_as_mapping in list, I think it could completed by copy the implementation from cpython, right?

@kmod
Copy link
Collaborator

kmod commented Jul 5, 2016

Our list object is very similar to CPython's, so that sounds like a good place to start even if there are small things that might have to be adjusted.

sizeoftank pushed a commit to sizeoftank/pyston_v1 that referenced this issue Jul 9, 2016
sizeoftank pushed a commit to sizeoftank/pyston_v1 that referenced this issue Jul 12, 2016
sizeoftank pushed a commit to sizeoftank/pyston_v1 that referenced this issue Jul 12, 2016
sizeoftank pushed a commit to sizeoftank/pyston_v1 that referenced this issue Jul 13, 2016
sizeoftank pushed a commit to sizeoftank/pyston_v1 that referenced this issue Jul 18, 2016
undingen added a commit that referenced this issue Jul 18, 2016
…issue1197

Add sq_slots & mp_slots to instance (issue #1197)
@kmod kmod added the old_v1 Issues leftover from the old v1 series label Oct 28, 2020
@kmod kmod closed this as completed Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
old_v1 Issues leftover from the old v1 series probably easy
Projects
None yet
Development

No branches or pull requests

3 participants