EgorBot / runtime-utils

MIT License
0 stars 1 forks source link

EgorBot for EgorBo in #107305 #85

Open EgorBot opened 2 months ago

EgorBot commented 2 months ago

Processing https://github.com/dotnet/runtime/issues/107305#issuecomment-2334576190 command:

Command -intel -commit 89839049b486bf48239dd6faa722defd3de320cb vs 9c9f6ada7ffd0cba60b75ca3e85f1052b9ab6404 --envvars DOTNET_JitDisasm:CtorBench ```cs using System; using BenchmarkDotNet.Attributes; using System.Collections.Generic; public class Perf_Uri { public static IEnumerable Ctor_MemberData() { yield return ["https://a.much.longer.domain.name"]; } [Benchmark] [ArgumentsSource(nameof(Ctor_MemberData))] public Uri CtorBench(string input) => new Uri(input); } ```

(EgorBot will reply in this issue)

EgorBot commented 2 months ago

Benchmark results on AzureIntel

BenchmarkDotNet v0.14.0, Ubuntu 22.04.4 LTS (Jammy Jellyfish)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores
  Job-MOTUES : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-XTHKRS : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
EnvironmentVariables=DOTNET_JitDisasm=CtorBench
Method Toolchain input Mean Error Ratio
CtorBench Before https(...).name [33] 140.7 ns 0.68 ns 1.00
CtorBench After https(...).name [33] 123.7 ns 0.56 ns 0.88

BDN_Artifacts.zip

EgorBot commented 2 months ago

cc @EgorBo (logs)