-
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
Use IndexOfAnyValues in System.Net.Http #78660
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsContributes to #78204 Example performance numbers for
|
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.
Nice.
I'm seeing failures on checked builds on ARM64 machines in #78678 that are likely related to changes to
cc: @EgorBo @tannergooding - this looks like different runtime behavior for |
It's showing up on other PRs as well. |
length = utf8.Length; | ||
} | ||
|
||
Encoding.ASCII.GetChars(utf8.Slice(0, length), builder.AppendSpan(length)); |
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.
Should this really be Encoding.ASCII
?
Given that the failure is on alpine I wonder if it could be some locale issue?
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.
It shouldn't be affected by locale. The input here will always be these bytes (all in the [0, 127]
range).
runtime/src/libraries/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs
Lines 24 to 27 in 2ae7f5d
// attr-char = ALPHA / DIGIT / "!" / "#" / "$" / "&" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" | |
// ; token except ( "*" / "'" / "%" ) | |
private static readonly IndexOfAnyValues<byte> s_rfc5987AttrBytes = | |
IndexOfAnyValues.Create("!#$&+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~"u8); |
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.
Makes sense, thanks. I also just noticed that there are non-alpine failures too.
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.
@MihaZupan no, it's not #78630 since revert still fails 🤔 |
Doing some tests in #78709 to try and narrow it down |
Contributes to #78204
Example performance numbers for
HttpRuleParser.IsToken
taken from #78093's description: