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 #125

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

EgorBot for EgorBo in #109014 #125

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-IUCNRB : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-YJVBKF : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Server=True
Method Toolchain Mean Error Ratio
CopyObjects2 Main 8.093 ns 0.0013 ns 1.00
CopyObjects2 PR 7.724 ns 0.0014 ns 0.95
CopyObjects10 Main 10.611 ns 0.0023 ns 1.00
CopyObjects10 PR 9.729 ns 0.0017 ns 0.92
CopyObjects128 Main 23.811 ns 0.0111 ns 1.00
CopyObjects128 PR 51.363 ns 0.1233 ns 2.16

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-DBRMHF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-YPTGEU : .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 8.438 ns 0.0325 ns 1.00
CopyObjects2 PR 6.560 ns 0.0429 ns 0.78
CopyObjects10 Main 8.862 ns 0.0520 ns 1.00
CopyObjects10 PR 8.021 ns 0.0712 ns 0.91
CopyObjects128 Main 18.749 ns 0.0324 ns 1.00
CopyObjects128 PR 26.767 ns 0.0521 ns 1.43

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