-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 MemoryExtensions.Count #80662
Add MemoryExtensions.Count #80662
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-memory Issue DetailsCloses #59466 Original implementation from @stephentoub. Testcases added for single values and the same tests for ReadOnlySpans. Test cases are mostly copied / inspired by other similar methods like Contains.
|
Thanks for working on this! |
Perhaps it was already mentioned above, but do you plan to follow up with a PR to add test cases to dotnet/performance? |
ded2d84
to
131e102
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
131e102
to
cc124a0
Compare
Closes #59466
Original implementation from @stephentoub.
Testcases added for single values and the same tests for ReadOnlySpans.
Types tested are byte, int, TInt and string.
Test cases are mostly copied / inspired by other similar methods like Contains.