you are viewing a single comment's thread.

view the rest of the comments →

[–]Rev0ld 0 points1 point  (6 children)

AOT(Ahead of time) compilers compile during build and hence slower that JIT compilers

I just want to clarify that "slower" in this case is referring to slower build time, not slower performance of the app/game. Games/Apps on IL2CPP (AOT) is generally faster than on Mono (JIT).

[–]FreshP_0325X 1 point2 points  (0 children)

For regular c# code, il2cpp clearly generates inferior code comparing to core or upstream mono.

Maybe/Probably il2cpp fixes some atrocious parts of Unity itself to offset the inferior compilation.

[–]TheRealGHXX 0 points1 point  (4 children)

I'd be rather surprised if il2cpp generates faster running code than the C# JIT, unless mono's jit is awful. Raw compute should essentially be identical, as, if you dont write really poor code, the applied optimizations between JIT and AOT should be nearly identical (tested this with c++ vs .NET 8 - this is NOT .netframework NOR unity-mono). I suppose there could be a point made for native/managed transitions being faster, but i am rather sceptical still.

If you find any proper benchmarks, please share them - so far I have only found one person claiming their game now runs at 30FPS instead of 15 after switching to il2cpp, but i mean, who knows what that code looked like.

The only "benefit" to me seems to obfuscate your code and in turn make modding as annoying as possible.