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

Comparison with MassTransit.NewId #66

Open
lucasteles opened this issue Mar 27, 2024 · 1 comment
Open

Comparison with MassTransit.NewId #66

lucasteles opened this issue Mar 27, 2024 · 1 comment

Comments

@lucasteles
Copy link

lucasteles commented Mar 27, 2024

Is there any comparison with MassTransit.NewId?

@jscarle
Copy link

jscarle commented Jul 21, 2024

I benchmarked creating a couple of different unique identifiers as I was also curious:

BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3880/23H2/2023Update/SunValley3)
13th Gen Intel Core i7-13700KF, 1 CPU, 24 logical and 16 physical cores
.NET SDK 9.0.100-preview.6.24328.19
  [Host]     : .NET 9.0.0 (9.0.24.32707), X64 RyuJIT AVX2
  DefaultJob : .NET 9.0.0 (9.0.24.32707), X64 RyuJIT AVX2

| Method       | Mean     | Error    | StdDev   | Ratio | Gen0   | Allocated | Alloc Ratio |
|------------- |---------:|---------:|---------:|------:|-------:|----------:|------------:|
| Guid_Create  | 33.06 ns | 0.041 ns | 0.038 ns |  1.00 |      - |         - |          NA |
| Ulid_Create  | 25.91 ns | 0.047 ns | 0.044 ns |  0.78 |      - |         - |          NA |
| NUlid_Create | 77.44 ns | 0.106 ns | 0.094 ns |  2.34 | 0.0066 |     104 B |          NA |
| NewId_Create | 28.48 ns | 0.039 ns | 0.032 ns |  0.86 |      - |         - |          NA |

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

2 participants