-
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] Linux/arm64: 8 Regressions on 10/7/2023 2:03:18 PM #93401
Comments
Either the JIT change #92768 cc @jakobbotsch or BCL changes (#93125 or #93126) |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsRun Information
Regressions in System.Collections.IterateFor<String>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IterateFor<String>*' PayloadsSystem.Collections.IterateFor<String>.ReadOnlySpan(Size: 512)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Text.Perf_Ascii
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.Perf_Ascii*' PayloadsSystem.Text.Perf_Ascii.ToUpper_Bytes_Chars(Size: 128)ETL FilesHistogramDescription of detection logic
JIT DisasmsSystem.Text.Perf_Ascii.ToLower_Bytes_Chars(Size: 128)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Buffers.Text.Tests.Base64Tests
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Buffers.Text.Tests.Base64Tests*' PayloadsSystem.Buffers.Text.Tests.Base64Tests.ConvertToBase64CharArray(NumberOfBytes: 1000)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.CreateAddAndClear<Int32>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.CreateAddAndClear<Int32>*' PayloadsSystem.Collections.CreateAddAndClear<Int32>.List(Size: 512)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.Perf_Frozen<NotKnownComparable>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.Perf_Frozen<NotKnownComparable>*' PayloadsSystem.Collections.Perf_Frozen<NotKnownComparable>.Contains_True(Count: 4)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Memory.Span<Char>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Memory.Span<Char>*' PayloadsSystem.Memory.Span<Char>.IndexOfAnyThreeValues(Size: 512)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository Run Information
Regressions in System.Collections.AddGivenSize<Int32>
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.AddGivenSize<Int32>*' PayloadsSystem.Collections.AddGivenSize<Int32>.List(Size: 512)ETL FilesHistogramDescription of detection logic
JIT DisasmsDocsProfiling workflow for dotnet/runtime repository
|
Same on Windows-Ampere-arm64: dotnet/perf-autofiling-issues#23009 |
Improvements in that commit range: |
A lot of these look bimodal/noisy, but some of them I should look closer at: |
The Looking at the |
@EgorBot -arm64 -perf -commit 15af764 vs previous // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using BenchmarkDotNet.Attributes;
namespace System.Collections
{
public class AddGivenSize
{
private int[] _uniqueValues;
public int Size = 512;
[GlobalSetup]
public void Setup() => _uniqueValues = Enumerable.Range(0, Size).ToArray();
[Benchmark]
public List<int> List()
{
var collection = new List<int>(Size);
var uniqueValues = _uniqueValues;
for (int i = 0; i < uniqueValues.Length; i++)
collection.Add(uniqueValues[i]);
return collection;
}
}
} |
Benchmark results on Arm64
Flame graphs: Main vs PR 🔥 For clean |
@EgorBot -arm64 --disasm --envvars "DOTNET_JitDisasm:List" -commit 15af764 vs previous // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using BenchmarkDotNet.Attributes;
namespace System.Collections
{
public class AddGivenSize
{
private int[] _uniqueValues;
public int Size = 512;
[GlobalSetup]
public void Setup() => _uniqueValues = Enumerable.Range(0, Size).ToArray();
[Benchmark]
public List<int> List()
{
var collection = new List<int>(Size);
var uniqueValues = _uniqueValues;
for (int i = 0; i < uniqueValues.Length; i++)
collection.Add(uniqueValues[i]);
return collection;
}
}
} |
@EgorBot -arm64 -commit 15af764 vs previous --disasm --envvars "DOTNET_JitDisasm:List" // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using BenchmarkDotNet.Attributes;
namespace System.Collections
{
public class AddGivenSize
{
private int[] _uniqueValues;
public int Size = 512;
[GlobalSetup]
public void Setup() => _uniqueValues = Enumerable.Range(0, Size).ToArray();
[Benchmark]
public List<int> List()
{
var collection = new List<int>(Size);
var uniqueValues = _uniqueValues;
for (int i = 0; i < uniqueValues.Length; i++)
collection.Add(uniqueValues[i]);
return collection;
}
}
} |
This comment was marked as resolved.
This comment was marked as resolved.
Benchmark results on Arm64
|
…dr -> ldp Very targeted fix for dotnet#93401 and dotnet#101437: before reordering two indirections, check if there is a potential store in the same loop that looks like it could end up being a candidate for store-to-load forwarding into one of those indirections. Some hardware does not handle store-to-load forwarding with the same fidelity when `stp`/`ldp` is involved compared to multiple `str`/`ldr`. If we detect the situation then avoid doing the reordering.
Run Information
Regressions in System.Collections.IterateFor<String>
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Collections.IterateFor<String>.ReadOnlySpan(Size: 512)
ETL Files
Histogram
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Text.Perf_Ascii
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Text.Perf_Ascii.ToUpper_Bytes_Chars(Size: 128)
ETL Files
Histogram
Description of detection logic
JIT Disasms
System.Text.Perf_Ascii.ToLower_Bytes_Chars(Size: 128)
ETL Files
Histogram
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Buffers.Text.Tests.Base64Tests
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Buffers.Text.Tests.Base64Tests.ConvertToBase64CharArray(NumberOfBytes: 1000)
ETL Files
Histogram
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Collections.CreateAddAndClear<Int32>
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Collections.CreateAddAndClear<Int32>.List(Size: 512)
ETL Files
Histogram
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Collections.Perf_Frozen<NotKnownComparable>
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Collections.Perf_Frozen<NotKnownComparable>.Contains_True(Count: 4)
ETL Files
Histogram
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Memory.Span<Char>
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Memory.Span<Char>.IndexOfAnyThreeValues(Size: 512)
ETL Files
Histogram
Description of detection logic
JIT Disasms
Docs
Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository
Run Information
Regressions in System.Collections.AddGivenSize<Int32>
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
System.Collections.AddGivenSize<Int32>.List(Size: 512)
ETL Files
Histogram
Description of detection logic
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: