.NET 10: Stack allocation of arrays of value types
Starting with .NET 9, the JIT compiler got smarter about how it allocates memory for objects. If it can tell that an object won’t be used after the method where it was created ends, it can put that object on the stack instead of the heap. This is a big win for performance because the…