-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Remove unsafe use ASCII.GetBytes for WriteAscii #18404
Conversation
Ah, and it's ASP.NET Core, so |
We still tend to use |
Why not use the framework-provided |
Drops some on LiveAspNet and TechEmpowerPlaintext; but is a win for Plaintext+Cookie
Probably worth it as it removes a chunk of more unusual code and pushes the perf requirements back to the runtime where everyone benefits from improvements? |
We can always make further improvements at the runtime layer if needed. Additionally, if you're able, calling |
Regresses by comparison, but will push to this branch to see if you see anything wrong with the implementation
|
Noticed am missing out a Macro-Op Fusion opportunity |
5c97cf9
to
3942648
Compare
Will go with that
|
Contributes to #4720 |
FWIW, I'd also personally like to see less unsafe code within the implementations of APIs like |
I’m all for these changes (I filed that issue) but we don’t want to suddenly drop on techpower As well. We should make sure we can measure and fix whatever regressions come as a result of this(or decide they are minimal). |
The If there's a performance need for such an API there's a WIP proposal for this and a bunch of related APIs posted at https://github.com/dotnet/corefx/issues/34144#issuecomment-564893304. Just let us know what you'd like to see prioritized. :) |
Hello @halter73! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
ResponseHeadersWritingBenchmark
/cc @halter73 @GrabYourPitchforks @gfoidl