The documentation from Unity that you referenced is quite old, and even while it is being written, I really wonder about these performance metrics. In general, performance is much more difficult to measure and report than can express a single number, for example, 50%.
If you want to know more about IL2CPP, check out this blog post .
Based on our tests for Unity, we see better performance for script-limit code with IL2CPP than with the Unity Mono version. You can find one test that we published here .
There are a few caveats to keep in mind:
- Unity uses the old version of the Mono runtime (circa 2011). Newer versions are better - and we are now working on updating the runtime.
- In most games, the code is not script -bound, it is usually associated with the GPU.
- The generated C ++ code still provides security for the managed language, so it, for example, checks the boundaries of the array.
- The performance difference between Mono AOT and IL2CPP compilers will vary by platform. On some platforms, the Mono AOT compiler generates machine code as well as a C ++ compiler. On other platforms, this is not the case.
source share