Skip to content

Skill idea: JIT-Aware Hot Path Optimization #9

Description

@artl93

Problem

The dotnet-performance-patterns skill (PR #6) covers customer-actionable API usage patterns. But deeper JIT-aware optimization — understanding what the JIT will actually do with specific code shapes — requires runtime-internal knowledge that generic AI lacks.

What expert .NET knowledge would this encode?

  • When the JIT will actually elide bounds checks vs. when it will not
  • Which patterns trigger tier-1 vs. tier-2 compilation
  • How [MethodImpl(AggressiveInlining)] interacts with PGO
  • When stackalloc helps vs. hurts (stack depth, async contexts)
  • The actual allocation profiles of LINQ operators and when CollectionsMarshal tricks are safe

Relationship to existing skills

Skill concept

Deepen the existing dotnet-jit-optimization skill or create a companion that goes beyond "use the right API" into "write code shapes the JIT can optimize" — with version-specific JIT behavior knowledge.

Why customers would value this

For customers with true hot-path code (game engines, high-frequency trading, cloud infrastructure), the difference between "the JIT inlined this" and "the JIT did not" is the difference between shipping and not shipping. This knowledge currently requires reading JIT source code or asking the runtime team directly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions