Skip to content

Commit 52167eb

Browse files
committed
Update docs for v3, improve packaging script
- Highlight MemoryStreamSlim's perf vs. RecyclableMemoryStream and announce new ToMemory() API in docs - Improve documentation formatting for clarity - Refactor package.cmd to use dotnet CLI with explicit project path and remove msbuild usage
1 parent b016694 commit 52167eb

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ This repository contains the ['KZDev.PerfUtils'](https://www.nuget.org/packages
88
- **StringBuilderCache**: A utility for caching StringBuilder instances to improve performance in high-throughput scenarios.
99
- **InterlockedOps**: A set of additional atomic thread-safe operations that extend the functionality of the Interlocked class in the .NET Class Library.
1010

11+
> [!IMPORTANT]
12+
> **MemoryStreamSlim** outperforms **RecyclableMemoryStream** across all benchmarked categories in this project. See the benchmark documentation for workload-by-workload comparisons.
13+
14+
> [!TIP]
15+
> **New in v3:** `MemoryStreamSlim.ToMemory()` provides a significantly more memory-efficient way to access raw stream buffers as `Memory<byte>`.
16+
1117
## Supported target frameworks
1218

1319
This package targets **.NET 8** (`net8.0`), **.NET 9** (`net9.0`), and **.NET 10** (`net10.0`). The 3.x line does not ship builds for older TFMs (including **.NET 6**); upgrade consuming projects to a supported target framework before referencing the latest package versions.

Source/Src/KZDev.PerfUtils/Package/nuget.readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The KZDev.PerfUtils package provides the following high-performance utility clas
66
- `StringBuilderCache`: A thread-safe cache of **StringBuilder** instances to improve speed and reduce the overhead of memory allocations associated with the **StringBuilder** class.
77
- `InterlockedOps`: A utility that extends the functionality of the **Interlocked** class in the .NET Class Library by providing additional atomic thread-safe operations.
88

9+
**Important:** **MemoryStreamSlim** outperforms **RecyclableMemoryStream** across all benchmarked categories in this project.
10+
11+
**New in v3:** `MemoryStreamSlim.ToMemory()` introduces a significantly more memory-efficient way to access raw stream buffers as `Memory<byte>`.
12+
913
## Supported target frameworks
1014

1115
This package targets **.NET 8** (`net8.0`), **.NET 9** (`net9.0`), and **.NET 10** (`net10.0`). The 3.x line does not ship builds for older TFMs (including **.NET 6**); upgrade consuming projects to a supported target framework before referencing the latest package versions.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
@ECHO OFF
22
SETLOCAL
3+
SET "PROJECTPATH=%~dp0KZDev.PerfUtils.csproj"
34
SET SOLUTIONPATH=%~dp0..\..
45

56
PUSHD %SOLUTIONPATH%
67

7-
dotnet clean -c Release
8-
dotnet restore
8+
dotnet clean "%PROJECTPATH%" -c Release
9+
dotnet restore "%PROJECTPATH%"
10+
dotnet pack "%PROJECTPATH%" -c Release --no-restore -p:IsPacking=true -p:ContinuousIntegrationBuild=true
911

1012
POPD
11-
12-
dotnet msbuild -t:Pack -p:IsPacking=true -p:Configuration=Release -p:ContinuousIntegrationBuild=true
1313

1414
:EOF
1515
ENDLOCAL

0 commit comments

Comments
 (0)