GuidRecycler 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package GuidRecycler --version 1.0.3                
NuGet\Install-Package GuidRecycler -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GuidRecycler" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GuidRecycler --version 1.0.3                
#r "nuget: GuidRecycler, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GuidRecycler as a Cake Addin
#addin nuget:?package=GuidRecycler&version=1.0.3

// Install GuidRecycler as a Cake Tool
#tool nuget:?package=GuidRecycler&version=1.0.3                

GuidRecycler

Save the planet, recycle your guids!

What is it?

GuidRecycler is a library that allows you to recycle guids. It is a simple concept.

Installation

GuidRecycler is available as a NuGet package.

Install-Package GuidRecycler

Usage:

Guid recyclers implement the common interface:

void Recycle(Guid guid);

To recycle a guid.

Guid GetGuid();

To retrieve a recycled (or new) guid.

Strategies

There are curently two strategies implemented:

  • ConcurrentGuidRecycler
    A robust thread-safe concurrent guid recycler.
  • GuidRecyclerSlim
    A non-thread-safe guid recycler that is faster than the concurrent guid recycler.

Performance

See the benchmarks in the benchmarks folder. It clearly shows that the both the concurrent guid recycler and the guid recycler slim are faster than the default guid generator. | Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Allocated | Alloc Ratio | |----------------------- |---------:|----------:|----------:|---------:|------:|--------:|----------:|------------:| | Guid.NewGuid | 647.9 ns | 113.68 ns | 327.99 ns | 600.0 ns | 1.00 | 0.00 | 600 B | 1.00 | | ConcurrentGuidRecycler | 307.1 ns | 49.97 ns | 146.56 ns | 300.0 ns | 0.58 | 0.39 | 600 B | 1.00 | | GuidRecyclerSlim | 224.0 ns | 28.33 ns | 81.75 ns | 200.0 ns | 0.45 | 0.30 | 600 B | 1.00 |

Contributing

PRs welcome. Merging not guaranteed.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 197 7/1/2023
1.0.4 152 6/26/2023
1.0.3 148 6/26/2023
1.0.2 146 6/26/2023
1.0.1 147 6/26/2023
1.0.0 157 6/26/2023
0.0.1 153 6/26/2023