A mini-announcement about Unity games, performance, and IL2CPP codegen:

https://blog.s-schoener.com/2025-04-07-cpp2better/

IL2CPP, but better | Sebastian Schöner

IL2CPP is Unity’s AOT solution for C#, which takes compiled C# in the form of IL-code and turns it into C++ code, which can then be compiled using regular native toolchains. I have looked at a lot of this generated C++ code and the machine code it compiles to. There...

Sebastian Schöner

@sschoener oooh that sounds excellent!

However, "why Burst is often still faster than Burst"? I want to know the answer to this question.

@aras Thanks! I have reshaped reality to no longer have this contradiction. I just need someone to restart Earth or something for the fix to apply.
@sschoener @aras pff there’s no hot reloading in this version of Earth?
@sschoener Sounds really interesting, do you have some examples of the "million small changes" that are made?

@vittorioromeo Mostly changes of the form "don't do unnecessary work." E.g. if I can statically determine that a function call is not necessary, I remove it. That sort of stuff.

The gains come from dealing with things that are inherent to dealing with code that needs to behave as if running in a dotnet environment, not from deep insight into C++ that would be applicable to generic C++ programs.

@sschoener When you say "turn this into a product", are you thinking Unity Asset Store levels of indie dev affordable or professional studio level of business expenses?
@lumpn no idea yet, but it's not exclusive (e.g. have a license system tiered by revenue, like how Unity itself works).
@sschoener PS: love your blog! ❤️
@sschoener can it test in webgl build?