-
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] Linux/x64: 4 Regressions on 2/25/2024 4:37:10 PM #99002
Comments
From #98623 Improvements: |
@EgorBo is this by design, so it could be closed? |
@EgorBot -amd64 -intel -perf -commit 79dd9ba vs fab69ef --disasm using BenchmarkDotNet.Attributes;
using System.Text;
public class MyProgram
{
const int LOHAllocatedStringSize = 100_000;
private string _stringLOH;
private string _string100;
private StringBuilder _builderSingleSegment100;
private StringBuilder _builderSingleSegmentLOH;
private StringBuilder _builderMultipleSegments100;
private StringBuilder _builderMultipleSegmentsLOH;
[GlobalSetup(Target = nameof(ToString_MultipleSegments))]
public void Setup_ToString_MultipleSegments()
{
_builderMultipleSegments100 = Append_Char(100); // 16 + 32 + 48 + 96 char segments
_builderMultipleSegmentsLOH = Append_Char(LOHAllocatedStringSize);
}
public StringBuilder Append_Char(int length)
{
StringBuilder builder = new StringBuilder();
for (int i = 0; i < length; i++)
builder.Append('a');
return builder;
}
[Benchmark]
[Arguments(LOHAllocatedStringSize)]
public string ToString_MultipleSegments(int length) => (length == 100 ? _builderMultipleSegments100 : _builderMultipleSegmentsLOH).ToString();
} |
Benchmark results on Intel
Flame graphs: Main vs PR 🔥 For clean |
Benchmark results on Amd
Flame graphs: Main vs PR 🔥 For clean |
@EgorBo so the regression still exists? |
It does, but there is not much we can do here. Since there are more improvements (11) than regressions (4) and the fact that that PR:
we can close it. |
Run Information
Regressions in System.Text.Tests.Perf_StringBuilder
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Text.Tests.Perf_StringBuilder.ToString_MultipleSegments(length: 100000)
ETL Files
Histogram
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
The text was updated successfully, but these errors were encountered: