Repository navigation
Implement SequenceReader.TryPeek(long offset, out T value) - #42364
Conversation
JeremyKuhne
left a comment
There was a problem hiding this comment.
Thanks for tackling this! I'd optimize for peeking within the current span, then fall back to using the internal TryCopyMultisegment as discussed inline.
The key design point is to make any in span operations as fast as possible. When we cross spans we should still try to be efficient, but it is okay to not be micro-optimized and favor code-reuse / clarity.
|
Thank you for your contribution. As announced in dotnet/coreclr#27549 this repository will be moving to dotnet/runtime on November 13. If you would like to continue working on this PR after this date, the easiest way to move the change to dotnet/runtime is:
|
JeremyKuhne
left a comment
There was a problem hiding this comment.
Sorry about the unnecessary confusion. Looks good with just some minor issues with comments (notably capitalizing the first word). You should also be validating that we get default out when the method returns false.
|
@JeremyKuhne ready to review, I'll take some other api after that. |
|
Awesome! |
|
thank's @ahsonkhan for review...bit busy days I'll take a look starting in middle of next week if it's not a problem, it's on my backlog now. |
Closes https://github.com/dotnet/corefx/issues/40845
cc: @JeremyKuhne