-
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] Windows/arm64: 1 Regression on 2/5/2024 4:01:54 PM #98176
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsRun Information
Regressions in Benchstone.BenchI.Array2
ReproGeneral Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Benchstone.BenchI.Array2*' PayloadsBenchstone.BenchI.Array2.TestETL FilesHistogramJIT DisasmsDocsProfiling workflow for dotnet/runtime repository
|
@EgorBot help |
EgorBot manual
All targets are Linux-only at the moment. NOTE: [DisassemblyDiagnoser] may cause unexpected crashes in BDN on Linux (at least on x64) Usage example: link |
@EgorBot -arm64 -perf -commit 1ed67a5 vs 7c90c57 --disasm // 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 System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;
namespace Benchstone.BenchI
{
public class Array2
{
public const int Iterations = 500000;
static T[][][] AllocArray<T>(int n1, int n2, int n3)
{
T[][][] a = new T[n1][][];
for (int i = 0; i < n1; ++i)
{
a[i] = new T[n2][];
for (int j = 0; j < n2; j++)
{
a[i][j] = new T[n3];
}
}
return a;
}
static void Initialize(int[][][] s)
{
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
for (int k = 0; k < 10; k++)
{
s[i][j][k] = (2 * i) - (3 * j) + (5 * k);
}
}
}
}
static bool VerifyCopy(int[][][] s, int[][][] d)
{
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
for (int k = 0; k < 10; k++)
{
if (s[i][j][k] != d[i][j][k])
{
return false;
}
}
}
}
return true;
}
[MethodImpl(MethodImplOptions.NoInlining)]
static bool Bench(int loop)
{
int[][][] s = AllocArray<int>(10, 10, 10);
int[][][] d = AllocArray<int>(10, 10, 10);
Initialize(s);
for (; loop != 0; loop--)
{
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
for (int k = 0; k < 10; k++)
{
d[i][j][k] = s[i][j][k];
}
}
}
}
bool result = VerifyCopy(s, d);
return result;
}
[Benchmark]
public bool Test() => Bench(Iterations);
}
} |
Benchmark results on Arm64
Flame graphs: Main vs PR 🔥 For clean |
(I flipped the base and PR above, there is an actual ~5% regression.) It looks like a case where we previously managed to CSE part of an address mode that ended up being repeated a number of times: Notice a bunch of new Anyway, given that the regression is so small I'm going to consider it acceptable. If we want to look closer at CSE'ing address modes that requires some closer investigations I think. |
Run Information
Regressions in Benchstone.BenchI.Array2
Test Report
Repro
General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md
Payloads
Baseline
Compare
Benchstone.BenchI.Array2.Test
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: