Unity's Mono problem: Why your C# code runs slower than it should
Execution of C# code in Unity’s Mono runtime is slow by today’s standards, much slower than you might expect! Our game runs 2-3x faster on modern .NET compared to Unity’s Mono, and in a few small benchmarks I measured speedups of up to 15x. I’ve spent some time investigating what’s going on and in this article I will present my findings and why everyone should want Unity’s .NET modernization to become production-ready as soon as possible.
AI Summary
The execution of C# code in Unity's Mono runtime is significantly slower than expected, with some tests showing speedups of up to 15 times when using modern .NET instead. This issue arises from Unity relying on the older Mono framework, which has lagged behind advancements in the .NET ecosystem since its inception in 2006. Despite efforts starting around 2018 to migrate to .NET CoreCLR for improved performance and feature parity, progress remains stalled, leaving many eager for a resolution.




