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

Support suboffsets in memoryviews #2727

Open
jakirkham opened this Issue Nov 20, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jakirkham
Contributor

jakirkham commented Nov 20, 2018

Currently suboffsets are not supported in memoryviews. This would be nice to have for use cases like Pillow's buffers.

@scoder

This comment has been minimized.

Contributor

scoder commented Nov 23, 2018

This probably has a performance impact, but it's worth investigating. It mainly changes the way offsets are calculated, which is one big formula generated by the memoryviews code. PR welcome, but we might have to hide the support behind an explicit option somehow, depending on how well the C compiler can deal with it. We might have to try and benchmark different options, maybe also something like likely(!suboffsets) ? (simple calculation) : (complex calculation). But first get it right, then make it fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment