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

Span-based bulk peeks (the boring kind) #3472

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

YoshiRulz
Copy link
Member

@YoshiRulz YoshiRulz commented Dec 4, 2022

This isn't using ReadOnlySpan to let the frontend and APIs read memory without copying. This still copies, but into a Span instead of an array, which probably makes no difference for internal use, and is slightly more convenient for ext. tools.
I could have exposed the overload which takes an array reference and writes into it, but I figured this way would mitigate user error. The use of an unsigned integer for the start offset, especially.

I'd appreciate if someone could double-check my pointer arithmetic is correct, i.e. it matches the arithmetic in the other overload's implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants