Skip to content

Repository for the 'KZDev.PerfUtils' nuget package that contains a number of performance focused utilities such as MemoryStreamSlim, StringBuilderCache, and InterlockedOps classes.

License

Notifications You must be signed in to change notification settings

kzdev-net/kzdev.perfutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KZDev.PerfUtils

This is the repository for the 'KZDev.PerfUtils' nuget package that contains the MemoryStreamSlim class; a high-performance, memory-efficient, and easy-to-use replacement for the MemoryStream class that provides particular benefits for large or frequently used streams.

Features

MemoryStreamSlim is a drop-in replacement for the MemoryStream class that provides the following benefits:

  • Throughput performance is better than the standard MemoryStream.
  • Much lower memory traffic and far fewer garbage collections than the standard MemoryStream.
  • Eliminates Large Object Heap (LOH) fragmentation caused by frequent use and release of single-byte arrays used by the standard MemoryStream.
  • Simple replacement for MemoryStream with the same API, other than the constructor.
  • Optionally allows using native memory for storage, which allows even more flexibility to minimize GC pressure.

Future Features

The roadmap plan for this package is to add several additional helpful performance focused utilities. These will be forthcoming as time permits, so this first release is focused just on the MemoryStreamSlim class.

Documentation

Full documentation for the package is available on the PerfUtils Documentation page.

Contribution Guidelines

At this time, I am not accepting external pull requests. However, any feedback or suggestions are welcome and can be provided through the following channels:

  • Feature Requests: Please use GitHub Discussions to discuss new new features or enhancements before opening a feature request. This will help ensure that your request is in line with the project's goals and vision.
  • Bug Reports: If you encounter any issues, feel free to open an issue so it can be addressed promptly.

I appreciate your understanding and look forward to collaborating with you through discussions and issue tracking.

About

Repository for the 'KZDev.PerfUtils' nuget package that contains a number of performance focused utilities such as MemoryStreamSlim, StringBuilderCache, and InterlockedOps classes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages