When C# is AOT compiled, the memory footprint is roughly the same.
I was looking for similar benchmarks but couldn't find anything conclusive. I found the benchmark game [1] but only had .net 7 AoT (not .net 8) benchmarks and memory consumption seems too high.
I'd ditch golang on a pinch as soon as I can use a decent type system, and C# seems like a great alternative.
Crystal would be my ideal but its compiler is still too slow, sadly.
[1] https://programming-language-benchmarks.vercel.app/csharp-vs...
I'm very curious to see how they managed to pull this off since from my knowledge of the development patterns, .net has historically been much more allocation-heavy (not that it isn't very efficient with allocated data).