scratch-buffer-strategy
CommunityChoose 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]withstackalloc, zeroedstackalloc,BufferScope<T>with stack-then-pool fallback, andArrayPool<T>.Sharedrenting. - 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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.