-
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
Fix perf regression in System.Net.NetworkInformation.PhysicalAddress #40571
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ public override bool Equals(object? comparand) | |
|
||
public override string ToString() | ||
{ | ||
return Convert.ToHexString(_address.AsSpan()); | ||
return HexConverter.ToString(_address.AsSpan(), HexConverter.Casing.Upper); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's concerning if the brand new public API is insufficient. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not concerted as we are talking about nanoseconds here. There is also #39702 to improve things (perf). The initial PR adding the public API was kept simple by design (to get it in for .NET 5). |
||
} | ||
|
||
public byte[] GetAddressBytes() | ||
|
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.
Was this not getting inlined already? I wonder why
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.
Methods with loops are generally too large to inline by default.
To confirm, you can try:
COMPlus_JitPrintInlinedMethods=<class_name>.<method name>
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 is considered unprofitable... (as per BDN inlining diagnoser)