News for hackers. Stuff that matters.
Re:A comparison of Rust's borrow checker to the one in C# by Rohansi on Thursday October 31, 2024 @10:00AM (#42007000)
Unity has literally the worst implementation of C# out there right now. Not only is it running Mono instead of .NET (Core) but it's also not even using Mono's generational GC (SGen). They have been working on switching from Mono to .NET for years now because Mono isn't being updated to support newer C# versions but it will also be a significant performance boost, according to one of the Unity developers in this area [1].

IL2CPP, Unity's C# to C++ compiler, does not help for any of this. It just allows Unity to support platforms where JIT is not allowed or possible. The GC is the same if using Mono or IL2CPP. The performance of code is also roughly identical to Mono on average, which may be surprising, but if you inspect the generated code you'll see why [2].

[1] https://xoofx.github.io/blog/2018/04/06/porting-unity-to-cor... [2] https://www.jacksondunstan.com/articles/4702 (many good articles about IL2CPP on this site)

Re:A comparison of Rust's borrow checker to the one in C# by para_parolu on Thursday October 31, 2024 @11:43AM (#42008015)
I believe Unity switched to net core last year
Re:A comparison of Rust's borrow checker to the one in C# by Rohansi on Thursday October 31, 2024 @01:21PM (#42009013)
They did not - it is still a work in progress with no announced target release date. They also have no current plans to upgrade the GC being used by IL2CPP (their C# AOT compiler).

https://discussions.unity.com/t/coreclr-and-net-modernizatio...