-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Perf -19%] System.Net.NetworkInformation.Tests.PhysicalAddressTests.PAShort #39720
Comments
Tagging subscribers to this area: @dotnet/ncl |
Triage: Not important for 5.0, still might be nice to see what caused it, but there haven't been any changes in the space ... |
@tannergooding who mentioned that he thought there was some change in this space. |
hmm That lines up with #37546 on Jul 17. That change did not go through ncl. |
The additional ~3ns can easily be explained by the added overhead of using the new public hex encoding API instead of an internal method without as many input checks. The easy fix would be to revert this line from: @danmosemsft Feel free to assign this issue to me, if you want me to open a PR and investigate whether the proposed change would actually help. I've also opened #39702 (some time ago) to vectorize hex encoding/decoding. This would provide a more sustainable solution that'll also help other places in the framework. Until now, no one from the team seemed to care. |
Per discussion in the PR, closing this as acceptable for improved code reuse. |
Thre regression is between 30-50%, are we sure that this method is never on hot path? System.Net.NetworkInformation.Tests.PhysicalAddressTests.PAShort
|
This test is for an address with a single byte. That doesn't exist in any real scenario. |
@stephentoub thanks for confirmation, should we remove this benchmark then? |
No strong opinion. |
If we wouldn't fix a 50% regression the scenario seems not worth having. Can it be modified to be useful? |
I'd say a 6-byte MAC address is likely the typical usecase for this class. |
Can we modify the test to don't run automatically? This may be canary so we are aware of changes even this is not real scenario. If that is not possible I think we should remove it assuming we have coverage for the "normal" cases. |
If we are not running this as part of the lab runs, is the value just for devs to run this test locally as a quick check if something has been regressed? |
I'm trying to imagine how this test would ever be useful, even if modified to use a 6-byte address instead of 1-byte, or some other modification. It's testing the ToString method on PhysicalAddress. And it takes ~20ns to run. This is not a a commonly used API. It is not perf critical. It could literally regress by 10000% and we'd still probably punt it. I vote to kill the test and focus on higher value stuff. |
Run Information
Regressions in System.Net.NetworkInformation.Tests.PhysicalAddressTests
Historical Data in Reporting System
Repro
git clone https://github.com/dotnet/performance.git py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter "System.Net.NetworkInformation.Tests.PhysicalAddressTests*"
Histogram
System.Net.NetworkInformation.Tests.PhysicalAddressTests.PAShort
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: