EgorBot / runtime-utils

MIT License
0 stars 1 forks source link

EgorBot for EgorBo in #69 #72

Open EgorBot opened 2 months ago

EgorBot commented 2 months ago

Processing https://github.com/EgorBot/runtime-utils/issues/69#issuecomment-2329987673 command:

Command -intel -amd ```cs using System.Text.Json; using BenchmarkDotNet.Attributes; public class Perf_Basic { static readonly Employee[] Data = Enumerable.Range(1, 4096) .Select(i => new Employee("John", "Manager", 30, 185.5, new DateTime(1990, 10, 10), new Employee("Джон", "Разработчик", 30 + i, 185.5, new DateTime(1990, 10, 10), null))).ToArray(); [Benchmark] public Employee[]? JsonRoundtrip() { var str = JsonSerializer.Serialize(Data); return JsonSerializer.Deserialize(str); } } public record Employee(string name, string title, int age, double height, DateTime applyDate, Employee? manager); ```

(EgorBot will reply in this issue)

EgorBot commented 2 months ago

Benchmark results on Intel

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
DefaultJob : .NET 9.0.0 (9.0.24.40507), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
StdDev=0.014 ms
Method Mean Error
JsonRoundtrip 13.50 ms 0.015 ms

BDN_Artifacts.zip

EgorBot commented 2 months ago

Benchmark results on Amd

BenchmarkDotNet v0.14.0, Ubuntu 22.04.4 LTS (Jammy Jellyfish)
AMD EPYC 7763, 1 CPU, 16 logical and 8 physical cores
DefaultJob : .NET 9.0.0 (9.0.24.40507), X64 RyuJIT AVX2
StdDev=0.035 ms
Method Mean Error
JsonRoundtrip 13.21 ms 0.040 ms

BDN_Artifacts.zip