We are thrilled to announce the release of ByteAether.Ulid version 1.3.2, now available on NuGet. This new version introduces full support for .NET 10 and finalizes our aggressive adoption of modern C# features to deliver the fastest, most secure, and most spec-compliant ULID implementation in .NET.
Our library is engineered for senior developers and architects focused on high-throughput services. We tackle critical identifier generation problems, including robust overflow handling and secure monotonic increments.
Dedicated .NET 10 Binaries
The primary feature of 1.3.2 is the inclusion of build artifacts specifically compiled against the .NET 10 SDK.
Our multi-targeting strategy is fundamental to our performance guarantee. We don't ship a single .NET Standard 2.0 assembly; instead, we provide optimized binaries for .NET 10, 9, 8, 7, 6, 5, and .NET Standard 2.1 and 2.0.
When you install the package, NuGet selects the .NET 10 binary, which is compiled with the latest JIT intrinsics and BCL (Base Class Library) improvements. This allows our codebase, which is rich with conditional compilation, to leverage the most powerful APIs available on each platform, including optimized ReadOnlySpan<T>, MemoryMarshal, and SIMD instructions for Base32 operations. This is key to our benchmark-leading speed.
The C# 14 field Keyword: Eliminating Hot Path Overhead
To ensure our ID generation is as fast as possible, we must eliminate all unnecessary overhead from the Ulid.New() hot path.
We use the new C# 14 field keyword within our GenerationOptions record for "fail-fast" validation. This design choice ensures that configuration validation runs only once when the configuration object is constructed, not inside the generation loop.
For example, ensuring the Monotonicity property is valid occurs during init:
public MonotonicityOptions Monotonicity
{
get;
init => field = Enum.IsDefined(typeof(MonotonicityOptions), value)
? value
: throw new ArgumentOutOfRangeException(/* ... */);
}
This single-time validation guarantees that any call to Ulid.New() operates with a pre-validated, zero-overhead configuration, a crucial optimization for high-volume systems.
Robustness: Programmatic Overflow Prevention
Reliability is as vital as performance. A common, though often unaddressed, problem is the OverflowException that can occur during rapid ULID generation within the same millisecond. This happens because the 80-bit random component can, by chance, start near its maximum value.
Our library solves this programmatically: when a random component overflow is imminent, we intelligently increment the 48-bit timestamp component by 1ms. This small, controlled time jump ensures continuous, error-free generation while maintaining the lexicographical sort order.
The GenerationOptions also supports advanced security, allowing control over the IRandomProvider and offering granular MonotonicityOptions (like MonotonicRandom1Byte) to defend against enumeration attacks.
Conclusion
The 1.3.2 release of ByteAether.Ulid provides .NET 10 support and leverages cutting-edge C# features to deliver a ULID implementation optimized for performance, security, and meticulous specification compliance.
We encourage you to adopt ByteAether.Ulid if your identifier generation strategy requires speed and robust design.
Read the full technical analysis and deep dive into the code on our blog. https://byteaether.github.io/2025/announcing-byteaetherulid-132-net-10-support-and-optimized-design/
Top comments (0)