unascribed / FlexVer

A SemVer-compatible intuitive comparator for free-form versioning strings as seen in the wild, designed to sort versions like people do.
Creative Commons Zero v1.0 Universal
64 stars 10 forks source link

csharp: sync `v1.1.0` from John-Paul-R/FlexVer #19

Closed John-Paul-R closed 1 year ago

John-Paul-R commented 1 year ago

This PR deals with some build/packaging details, and reworks the comparer implementation to be faster and make no heap allocations.

Benchmark results, using the version strings in the test harness:

Method Mean Error StdDev Gen0 Allocated
CompareAll_New 6.248 us 0.1228 us 0.2245 us - -
CompareAll_Existing 30.432 us 0.6077 us 1.1112 us 0.3967 33672 B

NuGet listing from these build changes: https://www.nuget.org/packages/FlexVer