3 ms·
All of these operations are so much faster in Microsofts C# (10x - 100x) than it is in the mono used by Unity. Is there really no way to use Microsofts C# here?
by Jensson 5y ago
All of these operations are so much faster in Microsofts C# (10x - 100x) than it is in the mono used by Unity. Is there really no way to use Microsofts C# here? From what I understand both use the same base C# runtime so it is mainly thanks to better written libraries and code generation, so should help even with IL2CPP.
Stuff like boxing/unboxing, calls using delegates, calling native code, using reflection etc are all much faster in Microsofts version.
- pjmlp 5y ago.NET Core doesn't run in game consoles, and they still rely on Mono for mobile devices.
- wokwokwok 5y agoYes, but that’s not because it’s impossible… just because unity decided to reengineer an entire language in house to build their product. Unfortunately, the reality is that Microsoft has more engineers and money devoted to this problem than unity possibly can, so the official c# runtime will continue to support more platforms and being new feature and better performance at a pace that is… …categorically not possible… For unity to match. So… while it’s a bitter pill to swallow, and it was done for reasons that seemed good at the time, it was the wrong choice, and that will become increasingly clear as time rolls on. There’s what I believe is a pretty classic case of sunk cost fallacy going on with a number of current initiatives in the Unity ecosystem. Some companies thrive under competition. Some… do not.
- pjmlp 5y agoExcept Microsoft is not spending any of their engineers making .NET run on PlayStation, Nintendo or XBox (.NET Native is a bastardised version and UWP is deprecated on the XBox anyway). Likewise in what concerns iOS, Android and WebAssembly, those same engineers keep using Mono runtime, as apparently there aren't as many resources as you paint. A good example of the resourcing problem is the ongoing tragedy of migrating the development from UWP into WinUI 3.0/AppSDK
- deterministic 5y agoThe Microsoft C# compiler team is actually quite small. And the Microsoft C# compiler doesn’t support consoles so no comparison.