-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Expose the IBinaryInteger<T>.ReadBig/LittleEndian APIs #73274
Conversation
…eadBigEndian APIs
…teger<T>.ReadBigEndian APIs
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-numerics Issue DetailsThis resolves #71902
|
src/libraries/System.Private.CoreLib/src/System/Numerics/IBinaryInteger.cs
Outdated
Show resolved
Hide resolved
@@ -4,6 +4,16 @@ | |||
using System.Numerics; |
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.
Not related to this PR, but we should rename this file at some point.
return false; | ||
} | ||
|
||
if ((source.Length > sizeof(byte)) && (source[..^sizeof(byte)].IndexOfAnyExcept((byte)0x00) != -1)) |
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.
Maybe we should try to squeeze in some vectorization of IndexOfAnyExcept for .NET 7?
#67942
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.
Its not going to be "critical" for this API in .NET 7. I expect these ones will be more rarely used.
If we can manage it, then that will be a bonus :)
This resolves #71902