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

gh-125420: implement Sequence.__contains__ API on memoryview objects #125441

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

picnixz
Copy link
Contributor

@picnixz picnixz commented Oct 14, 2024

@picnixz picnixz changed the title gh-125420: implement __contains__ to memoryview objects gh-125420: add __contains__ to memoryview objects Oct 14, 2024
@picnixz picnixz changed the title gh-125420: add __contains__ to memoryview objects gh-125420: implement Sequence.__contains__ API on memoryview objects Oct 14, 2024
@picnixz
Copy link
Contributor Author

picnixz commented Oct 14, 2024

Converting into a draft to decide whether the pure iterator approach is actually efficient enough or if iteration using the underlying multi-dimensional structure would be preferred (without spawning an iterator).

@picnixz picnixz marked this pull request as draft October 14, 2024 13:03
@picnixz
Copy link
Contributor Author

picnixz commented Oct 14, 2024

For now, let's just keep this implementation. It's probably faster than the generic implementation since there are less code paths but it could definitely be faster by iterating directly over the buffer (and we don't seem to support iterating over multi-dimensional buffers yet).

@picnixz picnixz marked this pull request as ready for review October 14, 2024 13:38
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.

1 participant