-
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
[Perf] Regressions in TryParseInt64 #56020
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Seems related to #52423 |
@DrewScoggins Do we know what processor this test was running on? The benchmarks I gave in #52423 were from my personal box (Ryzen 3950X), and I saw similar results on my work desktop (6th gen Intel). If these optimizations ended up being too sensitive to the particular processors I tested against then we can easily revert, no harm done. |
Another interesting consideration here is that the regression only seems to be for the extremes, where things like overflow checks start to kick in. According to DrewScoggins/performance-2#7394 and DrewScoggins/performance-2#7395 the original PR actually improved performance for more typical inputs. Still need to understand why the extremes saw a regression here, especially since my own benchmarking doesn't match what our labs are showing. But it makes me feel a bit better about the original PR not being bad across the board. |
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsRun Information
Regressions in System.Buffers.Text.Tests.Utf8ParserTests
Reprogit clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Buffers.Text.Tests.Utf8ParserTests*' PayloadsHistogramSystem.Buffers.Text.Tests.Utf8ParserTests.TryParseInt64(value: -9223372036854775808)
System.Buffers.Text.Tests.Utf8ParserTests.TryParseInt64(value: 9223372036854775807)
System.Buffers.Text.Tests.Utf8ParserTests.TryParseUInt64(value: 18446744073709551615)
DocsProfiling workflow for dotnet/runtime repository
|
Arm64 regression - DrewScoggins/performance-2#7611 |
@DrewScoggins @kunalspathak @stephentoub How important is it that this particular input ( On a related note, I've seen numerous times during this release incidents where we mix and match typical and atypical inputs within a single perf benchmark, and while improving typical inputs we regress atypical inputs (see |
It's a balancing act. If we care at all about the edge cases, I think it's still worth having representative examples of them harnessed in the perf tests; if we made parsing long.MaxValue 10,000x times slower, we'd want to know about it and that would likely outweigh other improvements that made most parsing 5% faster, since there are legitimate cases where that value might manifest and be parsed, e.g. when used as a sentinel to indicate data isn't available. But it seems Levi's change made parsing of common values 10% faster and of less common values up to 2x slower. If the common values are parsed 10x more frequently, which they almost certainly are, that's a win. It'd be helpful to understand what causes the regression to know how much of the spectrum it impacts and why. |
Yeah, I agree with @stephentoub here. The way that we think about it is we want to make sure that for the tests that we have we file issues when we see real regressions in the product. We intentionally do not make value judgements on the a regression before we file it. The goal being that when a regression occurs we should have a discussion with the area owner so we can understand what the correct response is to the issue. Our goal is not necessarily to ensure that we get back the time lost in a regression, but to weigh the costs and the benefits of the change so that make an informed performance decision. |
A regression for unusual inputs is unlikely to meet the bar now. |
Closing this as we concluded we made the right tradeoffs. |
Run Information
Regressions in System.Buffers.Text.Tests.Utf8ParserTests
Historical Data in Reporting System
Repro
Payloads
Baseline
Compare
Histogram
System.Buffers.Text.Tests.Utf8ParserTests.TryParseInt64(value: -9223372036854775808)
System.Buffers.Text.Tests.Utf8ParserTests.TryParseInt64(value: 9223372036854775807)
System.Buffers.Text.Tests.Utf8ParserTests.TryParseUInt64(value: 18446744073709551615)
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: