Looking at this another way: you need >20x more memory to achieve the same level of performance as native code in C#. Suddenly the benchmark doesn't look that great anymore.
Looking at this another way: you need >20x more memory to achieve the same level of performance as native code in C#. Suddenly the benchmark doesn't look that great anymore.
It's more like, you need 10x more memory with 100x more productivity than C/C++.
If you don't care about productivity, however, you can actually write C# as you'd write C, and with a very similar perf profile. You can put everything into structs to avoid heap allocations, for example. You could use stackalloc, which basically gives you fixed-size non-bounds-checked stack-allocated arrays, exactly as in C. You can have pointers that GC knows nothing about, and you can even do arithmetic on them like in C. You can even have type punning unions. And then you can put an API on top of all that which makes it usable with async/await - and write the rest of your code in high-level C#.
I threw this benchmark together in a couple of hours pretty easily. The most annoying part was just measuring the RAM :-)
But yes, everything is a tradeoff. If you want safety, you pay more - either in RAM, or in cognitive load.