Monthly Archives: October 2019

Announcing: Microsoft.IO.RecyclableMemoryStream 1.3.0

It’s a long time coming, but I’ve finally released the next version of Microsoft.IO.RecyclableMemoryStream!

Links

What’s New

Bug Fixes

  • Removed a buggy and unnecessary boundary check in Write methods. (927e173, benmwatson)

Performance

  • Removed LINQ iteration in some properties (ffe469c, ndrwrbgs)
  • Overloads of Read, SafeRead, and Write that accept Span<byte> arguments (.NET Core and .NET Standard targets only) (86fc159, brantburnett)

Functionality

  • New buffer allocation strategy: exponential. Instead of linearly increasing large buffer sizes by a fixed multiple (say, 1MB), you can choose to have it increase exponentially in size, starting with smaller large buffers. This will allow you more efficient use of space, especially in smaller heap scenarios where you don’t have gobs of memory to keep in a pool. We use this in Bing in some data centers that are more resource constrained than others. (4755383, magicpanda0618)
  • New targets for .NET Framework 4.6, .NET Standard 2.1 (4e97a7c, brantburnett,
    927e173, benmwatson)
  • Overload for TryGetBuffer, introduced in .NET Framework 4.6.
    (927e173, benmwatson)
  • Allow the Stream’s GUID to be set explicitly (c21b25b, mosdav)

Meta

  • Removed CBT build support files. Using dotnet.exe to build now.
  • Added public key for delayed signing during build
  • Consolidate and updated all NuGet package settings in the .csproj file.
  • Added setting for generating a NuGet package for symbols (.snupkg)

Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: