scratch-buffer-strategy

Community

Choose the optimal scratch buffer for hot paths.

AuthorJeremyKuhne
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Identify and apply the most efficient scratch-buffer strategy to minimize allocations and zeroing on hot paths in .NET applications across net481 and net10.

Core Features & Use Cases

  • Options: [SkipLocalsInit] with stackalloc, zeroed stackalloc, BufferScope<T> with stack-then-pool fallback, and ArrayPool<T>.Shared renting.
  • Guidance: Provides a decision tree and crossover thresholds to pick the cheapest valid path for given buffer size and lifetime, with cross-framework considerations.
  • Use Case: When profiling a hot path that allocates a short-lived scratch buffer and you need to minimize allocations and zeroing while staying within stack limits.

Quick Start

Use the recommended scratch-buffer strategy for a hot-path buffer decision in your codebase.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: scratch-buffer-strategy
Download link: https://github.com/JeremyKuhne/touki/archive/main.zip#scratch-buffer-strategy

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.