3 ms·
Nice! That's (seems) so simple yet also so very effective. Shouldn't other memory-managed languages be able to profit from this as well?
by bertylicious 7mo ago
Nice! That's (seems) so simple yet also so very effective. Shouldn't other memory-managed languages be able to profit from this as well?
- deleted 7mo ago[deleted]
- lionkor 7mo agoC# has `stackalloc`
- bertylicious 7mo agoBut that requires an explicit declaration and isn't done automatically under the hood, or am I missing something?
- Smaug123 7mo agoThe JIT does this automatically in some cases as of .NET 10 (https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-10/runtime#stack-allocation https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotn...).
- KolmogorovComp 7mo agoIt’s a very well known pattern, as someone else mentioned it’s used in CPP in smallstring, Rust smallvec, C usually hand rolled etc.