You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
TakeStartLine() is one of the hot methods in TechEmPower PlainText and JSON benchmarks.
Jitted code of this method could be improved in the following way:
This method calls the following methods by passing structs by value
The struct param in question is MemoryPoolIterator, which is a struct with two fields: a ref and an int. On Amd64 a local copy of struct param is made and a reference to local copy is passed by reference. Since there are many such calls, at each call site struct params needs to be copied to local. This struct passing overhead could be avoided if caller TakeStartLine() passes struct params by reference.
The text was updated successfully, but these errors were encountered:
sivarv
changed the title
Scope for improving Microsoft::AspNetCore::Server::Kestrel::Internal::Http::Frame::TakeStartLine(SocketInput)
Scope for improving Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame.TakeStartLine(SocketInput)
Nov 15, 2016
Currently these methods are extensions and C# doesn't allow the first parameter to be byref dotnet/roslyn#165 Interestingly VB.NET does.
GetKnownVersion and GetKnownMethod could probably be aggressively inlined and remain extensions (this would have same effect?) as they are only used in one place.
GetAsciiString and GetUtf8String could be changed to regular methods as they are fairly general?
I have a benchmark that gives consistent results so will measure.
TakeStartLine() is one of the hot methods in TechEmPower PlainText and JSON benchmarks.
Jitted code of this method could be improved in the following way:
This method calls the following methods by passing structs by value
The struct param in question is MemoryPoolIterator, which is a struct with two fields: a ref and an int. On Amd64 a local copy of struct param is made and a reference to local copy is passed by reference. Since there are many such calls, at each call site struct params needs to be copied to local. This struct passing overhead could be avoided if caller TakeStartLine() passes struct params by reference.
The text was updated successfully, but these errors were encountered: