Skip to content
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

EgorBot for EgorBo in #109014 #123

Open
EgorBot opened this issue Oct 18, 2024 · 4 comments
Open

EgorBot for EgorBo in #109014 #123

EgorBot opened this issue Oct 18, 2024 · 4 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Oct 18, 2024

Processing dotnet/runtime#109014 (comment) command:

Command

-intel -arm64 -profiler -nonativepgo

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

[GcServer(true)]
public class Bench
{
    static object[] Src0 = Enumerable.Range(0, 2).Select(i => (object)i).ToArray();
    static object[] Src1 = Enumerable.Range(0, 10).Select(i => (object)i).ToArray();
    static object[] Src2 = Enumerable.Range(0, 128).Select(i => (object)i).ToArray();
    static object[] Dst = new object[128];

    [Benchmark]public void CopyObjects2() => Src0.AsSpan().CopyTo(Dst);
    [Benchmark]public void CopyObjects10() => Src1.AsSpan().CopyTo(Dst);
    [Benchmark]public void CopyObjects128() => Src2.AsSpan().CopyTo(Dst);
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 18, 2024

Benchmark results on Arm64

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
Arm64
  Job-RXNURD : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-OIFMBI : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Server=True
Method Toolchain Mean Error Ratio
CopyObjects2 Main 7.424 ns 0.0008 ns 1.00
CopyObjects2 PR 6.943 ns 0.0003 ns 0.94
CopyObjects10 Main 11.247 ns 0.0027 ns 1.00
CopyObjects10 PR 7.467 ns 0.0055 ns 0.66
CopyObjects128 Main 22.994 ns 0.0063 ns 1.00
CopyObjects128 PR 22.394 ns 0.0063 ns 0.97

BDN_Artifacts.zip

Profile for Bench_CopyObjects128:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

Profile for Bench_CopyObjects2:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

Profile for Bench_CopyObjects10:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 18, 2024

cc @EgorBo (logs)

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 18, 2024

Benchmark results on Intel

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
Intel Xeon Platinum 8488C, 1 CPU, 16 logical and 8 physical cores
  Job-MFQLBF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-XHXEZY : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Server=True
Method Toolchain Mean Error Ratio
CopyObjects2 Main 7.904 ns 0.1906 ns 1.00
CopyObjects2 PR 7.819 ns 0.1203 ns 0.99
CopyObjects10 Main 8.886 ns 0.1173 ns 1.00
CopyObjects10 PR 8.803 ns 0.2013 ns 0.99
CopyObjects128 Main 18.716 ns 0.2499 ns 1.00
CopyObjects128 PR 16.769 ns 0.2169 ns 0.90

BDN_Artifacts.zip

Profile for Bench_CopyObjects128:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

Profile for Bench_CopyObjects2:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

Profile for Bench_CopyObjects10:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 18, 2024

cc @EgorBo (logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant