Namespace KZDev.PerfUtils
Classes
- InterlockedOps
A collection of helper methods for atomic operations.
- MemoryStreamSlim
MemoryStreamSlim is a memory stream that is designed to be more memory efficient, and often times faster than the standard MemoryStream class. For relatively small size streams, this utilizes a specialized pool of small buffers for the backing memory, which can reduce the number of allocations and the amount of memory used; and for larger streams, it uses a list of re-usable buffers to store the contents of the stream that are allocated by an internally managed buffer pool that is designed to minimize GC memory traffic pressure, by allocating directly from the large object heap, and re-using buffers as much as possible.
This is only designed to replace MemoryStream use cases where the stream does not wrap an existing specific byte array. If an existing byte array buffer is provided on creation, that array will be used as the backing store, and the MemoryStreamSlim will simply wrap a standard MemoryStream to provide the same functionality as the standard MemoryStream.
- MemoryStreamSlimOptions
Options for configuring MemoryStreamSlim instances.
- StringBuilderCache
Provides cached reusable StringBuilder instances.
Structs
- MemoryStreamSlimSettings
The effective settings for MemoryStreamSlim instances.
- StringBuilderScope
Represents a scope in which a cached Builder instance is retrieved and released back to the cache.
Enums
- MemoryStreamSlimMode
The mode of the memory stream.
- MemoryStreamSlimZeroBufferOption
Options for how to handle memory clearing when a memory buffer is not in use.