-
Notifications
You must be signed in to change notification settings - Fork 4
Benchmarks
BenchmarkDotNet is used for all benchmarking done for this library. It's used extensively to make comparisons to competitors, as well as for benchmarking different approaches used in this library.
All benchmarks are reproducible and can be found in TypeId.Benchmarks project.
At the moment of writing, there are 2 more implementations of TypeId in .NET:
Benchmarks code can be found in TypeId.Benchmarks/LibraryComparison.
In this benchmark, the TypeId is generated N
times in a loop.
BenchmarkDotNet v0.13.6, Windows 11 (10.0.22621.1992/22H2/2022Update/SunValley2)
AMD Ryzen 9 7950X3D, 1 CPU, 32 logical and 16 physical cores
.NET SDK 6.0.412
[Host] : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
DefaultJob : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
// Paste benchmarks here
In this benchmark, the TypeId is parsed from the string representation N
times in a loop.
BenchmarkDotNet v0.13.6, Windows 11 (10.0.22621.1992/22H2/2022Update/SunValley2)
AMD Ryzen 9 7950X3D, 1 CPU, 32 logical and 16 physical cores
.NET SDK 6.0.412
[Host] : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
DefaultJob : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
// Paste benchmarks here
In this benchmark, the TypeId is serialized to string N
times in a loop.
BenchmarkDotNet v0.13.6, Windows 11 (10.0.22621.1992/22H2/2022Update/SunValley2)
AMD Ryzen 9 7950X3D, 1 CPU, 32 logical and 16 physical cores
.NET SDK 6.0.412
[Host] : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
DefaultJob : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
// Paste benchmarks here
This benchmark aims to simulate a common web-app query flow when data is retrieved from the database and returned in a JSON response. This flow involves:
- Parsing the string representation of TypeId (retrieving from DB and mapping to .NET entity)
- Serializing the TypeId instance to string (for JSON response).
BenchmarkDotNet v0.13.6, Windows 11 (10.0.22621.1992/22H2/2022Update/SunValley2)
AMD Ryzen 9 7950X3D, 1 CPU, 32 logical and 16 physical cores
.NET SDK 6.0.412
[Host] : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
DefaultJob : .NET 6.0.20 (6.0.2023.32017), X64 RyuJIT AVX2
// Paste benchmarks here