Skip to content

Add lightweight UTF-8 pipelines sample - #16

Merged
balajibashyam merged 5 commits into
mainfrom
feature/high-performance-pipelines-sample
Aug 5, 2026
Merged

Add lightweight UTF-8 pipelines sample#16
balajibashyam merged 5 commits into
mainfrom
feature/high-performance-pipelines-sample

Conversation

@balajibashyam

@balajibashyam balajibashyam commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal .NET 10 companion sample for the High-Performance C#: Span, Memory, SIMD & Pipelines tutorial.

What's included

  • New sample: csharp-language/high-performance-memory-management/ — 13 files

    • PipeReader-based UTF-8 log ingestor with newline framing
    • Single-segment zero-copy parse path
    • Multi-segment bounded MemoryPool copy path
    • Utf8Parser exact-consumption numeric parsing
    • UTF-8 validation via Rune.DecodeFromUtf8
    • CRLF, LF, and final unterminated line support
    • Caller stream ownership and cancellation propagation
    • Bounded oversized-record discard with recovery after newline
    • Deterministic console output with valid/invalid line counts
    • 8 xUnit v3 tests covering parse, decode, and ingest paths
  • Root README: New sample row in the table + updated repository structure

  • GitHub Actions: New test-high-performance-pipelines job in the shared workflow; path filters updated for push and pull_request

Deliberately omitted (stays in the full tutorial)

stackalloc, unsafe code, MemoryMarshal, SIMD, hardware intrinsics, BenchmarkDotNet, ASP.NET Core, NDJSON, full CSV quoting, performance claims

Versions

  • .NET SDK: 10.0.302
  • System.IO.Pipelines: provided by the .NET 10 shared framework
  • Application NuGet dependencies: none
  • Microsoft.NET.Test.Sdk: 18.8.1
  • xunit.v3: 3.2.2
  • xunit.runner.visualstudio: 3.1.5

Validation

  • dotnet restore — passed
  • dotnet build --configuration Release — passed (0 errors, 0 warnings)
  • dotnet test --configuration Release — passed (8/8)
  • Security scan — clean

Commits

  1. Add lightweight UTF-8 pipelines sample
  2. Add pipelines ingestion sample to repository README
  3. Test pipelines ingestion sample in GitHub Actions
  4. Bound pipeline input and remove pruned package

@balajibashyam
balajibashyam merged commit 58621a8 into main Aug 5, 2026
18 checks passed
@balajibashyam
balajibashyam deleted the feature/high-performance-pipelines-sample branch August 5, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant