本文へ移動
cccskills
無料GitHub で公開

dotnet-performance

Performance optimization and measurement for .NET applications. Navigation skill covering Span, ArrayPool, memory management, benchmarking, profiling, Native AOT, and optimization patterns. For building high-performance applications. Keywords: performance, optimization, span, arraypool, benchmarking, profiling, memory, gc, aot, native-aot

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

.NET Performance

Performance optimization and measurement for .NET applications. This meta-skill provides navigation to ~10 performance-focused skills covering zero-allocation coding, benchmarking, profiling, Native AOT, and optimization patterns.

When to Use This Skill

Load this skill when:

  • Optimizing application performance and allocations
  • Measuring performance with BenchmarkDotNet
  • Profiling memory or CPU usage
  • Building Native AOT applications
  • Tuning garbage collection
  • Reducing memory allocations

Quick Navigation

Optimization Patterns

NeedLoad SkillLevel
Span, ArrayPool, ref structdotnet-performance-patternsAdvanced
Type design for performancedotnet-csharp-type-design-performanceAdvanced
LINQ optimizationdotnet-linq-optimizationIntermediate

Memory Management

NeedLoad SkillLevel
GC tuning, LOH/POHdotnet-gc-memoryAdvanced
Struct vs class decisionsdotnet-csharp-type-design-performanceAdvanced

Measurement

NeedLoad SkillLevel
BenchmarkDotNet setupdotnet-benchmarkdotnetIntermediate
Profiling toolsdotnet-profilingAdvanced
CI performance gatesdotnet-ci-benchmarkingAdvanced

AOT & Compilation

NeedLoad SkillLevel
Native AOT publishingdotnet-native-aotAdvanced
AOT architecture patternsdotnet-aot-architectureAdvanced
WASM AOTdotnet-aot-wasmAdvanced
Trimmingdotnet-trimmingIntermediate
Multi-targetingdotnet-multi-targetingIntermediate

Platform-Specific

NeedLoad SkillLevel
MAUI iOS/Catalyst AOTdotnet-maui-aotAdvanced

Performance Decision Trees

Which Optimization Technique?

Reduce allocations → Span<T>, ArrayPool<T> (dotnet-performance-patterns)
        ↓
Improve throughput → Struct optimization (dotnet-csharp-type-design-performance)
        ↓
Reduce startup time → Native AOT (dotnet-native-aot)
        ↓
Optimize queries → LINQ optimization (dotnet-linq-optimization)

Which Measurement Tool?

GoalToolSkill
MicrobenchmarksBenchmarkDotNetdotnet-benchmarkdotnet
Live profilingdotnet-tracedotnet-profiling
Memory analysisdotnet-countersdotnet-profiling
Crash dumpsdotnet-dumpdotnet-profiling
CI gatingAutomated benchmarksdotnet-ci-benchmarking

When to Use Native AOT?

ScenarioRecommendation
CLI toolsStrongly recommended
MicroservicesConsider for fast startup
ContainersGood for size reduction
Web APIsEvaluate trade-offs
LibrariesUse IsTrimmable

Complete Skill List

Optimization Patterns (3 skills)

  • dotnet-performance-patterns - Span, ArrayPool, ref struct
  • dotnet-csharp-type-design-performance - Struct vs class design
  • dotnet-linq-optimization - IQueryable vs IEnumerable

Memory & GC (2 skills)

  • dotnet-gc-memory - GC tuning, LOH/POH
  • dotnet-performance-patterns - Memory patterns

Benchmarking & Profiling (3 skills)

  • dotnet-benchmarkdotnet - BenchmarkDotNet
  • dotnet-profiling - dotnet-counters, trace, dump
  • dotnet-ci-benchmarking - CI performance gating

AOT & Compilation (5 skills)

  • dotnet-native-aot - PublishAot, descriptors
  • dotnet-aot-architecture - AOT-first design
  • dotnet-aot-wasm - Blazor/Uno WASM
  • dotnet-trimming - Trimming annotations
  • dotnet-multi-targeting - Polyfills, multi-TFM

Platform-Specific (1 skill)

  • dotnet-maui-aot - MAUI iOS/Catalyst optimization

Build Optimization (2 skills)

  • dotnet-build-optimization - Slow build diagnosis
  • dotnet-artifacts-output - UseArtifactsOutput

Performance Patterns

Zero-Allocation Patterns

// Use Span<T> instead of arrays
public void Process(Span<byte> data) { }

// Use ArrayPool<T> for temporary buffers
var buffer = ArrayPool<byte>.Shared.Rent(1024);
try { /* use buffer */ }
finally { ArrayPool<byte>.Shared.Return(buffer); }

// Use stackalloc for small fixed buffers
Span<int> stack = stackalloc int[100];

Struct Design

// Mark readonly for immutability
public readonly struct Point(double x, double y);

// Use ref readonly for large structs
public ref readonly Point GetOrigin();

// Seal classes for devirtualization
public sealed class Calculator { }

GC Optimization

  • Use GC.TryStartNoGCRegion for critical sections
  • Pool objects to reduce Gen 0 collections
  • Avoid LOH fragmentation with ArrayPool
  • Consider GC configs for server apps

Cross-References

  • Fundamentals → dotnet-fundamentals
  • Architecture → dotnet-architecture
  • Security → dotnet-security
  • Web → dotnet-web

Version Assumptions

  • .NET 8.0+ for modern patterns
  • Native AOT requires .NET 7.0+
  • HybridCache requires .NET 8.0+
  • BenchmarkDotNet works on all versions

Anti-Patterns to Avoid

  1. Premature optimization - Measure first
  2. Ignoring GC pressure - Monitor allocations
  3. Using ValueTask incorrectly - Don't await twice
  4. Async void methods - Always use Task
  5. Ignoring async state machine overhead - Consider sync for hot paths

See Also

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Patterns and techniques for evaluating and improving AI agent outputs.

日本語の概要は準備中です。原文の説明を表示しています。

rudironsoni/Synaxis22026年3月17日 更新

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations.

日本語の概要は準備中です。原文の説明を表示しています。

rudironsoni/Synaxis22026年3月17日 更新

Use when user requests research requiring multiple sources, comprehensive analysis, or synthesis across topics - technical research, domain knowledge gathering, market analysis, or learning about complex subjects

日本語の概要は準備中です。原文の説明を表示しています。

rudironsoni/Synaxis22026年3月17日 更新

deep-wiki

無料

AI-powered wiki generation for code repositories with commands, agents, and skills

日本語の概要は準備中です。原文の説明を表示しています。

rudironsoni/Synaxis22026年3月17日 更新

Use when building .NET 10 or C# 14 applications; when using minimal APIs, modular monolith patterns, or feature folders; when implementing HTTP resilience, Options pattern, Channels, or validation; when seeing outdated patterns like old extension method syntax

日本語の概要は準備中です。原文の説明を表示しています。

rudironsoni/Synaxis22026年3月17日 更新

Implements accessible .NET UI. SemanticProperties, ARIA, AutomationPeer, testing per platform.

日本語の概要は準備中です。原文の説明を表示しています。

rudironsoni/Synaxis22026年3月17日 更新

rudironsoni のスキルをすべて見る

このスキルの問題を報告する