upvote
It’s a very well known pattern, as someone else mentioned it’s used in CPP in smallstring, Rust smallvec, C usually hand rolled etc.
reply
deleted
reply
C# has `stackalloc`
reply
But that requires an explicit declaration and isn't done automatically under the hood, or am I missing something?
reply
The JIT does this automatically in some cases as of .NET 10 (https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotn...).
reply