Choosing Between Task and ValueTask in C# I/O Code
ValueTask avoids heap allocations on synchronous paths in I/O-heavy C# code, but it carries lifetime constraints and struct-size trade-offs. A benchmarked cache-hit example shows 90% allocation reduction—when used correctly.