New Release - Version 0.2.0
Published:
2020-12-20

RandN v0.2.0 has been released! It's available at NuGet and GitHub. Highlights of this release include:

  • ChaCha is now SIMD accerated and has between 6x-11x higher throughput on CPUs supporting AVX2 on .NET Core 3.1 and 5+ compared to .NET Framework 4.7.2.
  • The RandN.Distributions namespace has been reworked significantly to make discovery and usage easier.
  • Comprehensive unit test coverage.
  • Many bugs found and fixed thanks to improved testing.
  • This fancy documentation website!

A full list of changes, including breaking changes from v0.1 to v0.2, is included further below.

What's next?

More distributions and more RNG algorithms - whether or not these will be included alongside RandN's primary NuGet package or on another is still TBD.

More efficient one-off range distribution - right now, an entire Uniform object must be built before sampling a range; this could make some use cases, such as the RandomShim, much more efficient.

Improvements to website versioning - only the Docs and API need to be versioned, not the blog or the index page.

Full Changelog

New APIs

Updated APIs

Removed APIs

  • Removed the Sample extension methods - these were questionably useful, and could be up to four times slower than their non-extension counterpart, IDistribution.Sample.

Bug fixes

  • Distributions returning floating point numbers would sometimes sample a number outside the desired range on .NET Framework x86, which can use 80-bit floating point calculations, instead of 64-bit. Results are now forced to 64-bit precision before returning.
  • BitwiseExtensions.RotateRight now rotates bits right instead of left on .NET Core 3.1+.
  • All places where overflow is expected is now wrapped with unchecked.

Miscellaneous

  • Full test coverage, excluding portions that can't be tested without a big-endian processor.
  • Pure methods and properties in RandN.Core have been marked with the [Pure] attribute.
  • Use of C# 9 features across the board where possible.
  • Fixed a bunch of things suggested by ReSharper.
  • More benchmarks have been added.