Instantly Boost Unity Game Performance With IL2CPP_USE_SPARSEHASH
Finally, another post on my blog. This investigation was time-consuming, and while I won't say I enjoy digging through generated C++ code, the results were worth the effort. Hit the fire emoji if you like this type of content and want me to write more of it.
The metadata in IL2CPP generated for each type and used for tasks like virtual method invocation is barely covered online. Not even the Unity documentation provides sufficient information. More crucially, you won't find details online about how the metadata is stored in memory or the existence of the define IL2CPP_USE_SPARSEHASH. In this post, I dive into the internals available in the generated C++ code to learn more about it and how we can significantly boost the performance of some operations in our games using this knowledge.
Here is a lifehack to improve performance using a concrete example of dependency resolution at the app start for all DI enjoyers. Of course, this isn't free, but performance is always about compromise.
https://gamedev.center/instantly-boost-unity-game-performance-with-il2cpp_use_sparsehash/
I've also posted this on Reddit, so I would appreciate it if you upvote it for all the effort put into this: a reddit post
#il2cpp #performance #optimization #IL2CPP_USE_SPARSEHASH
Post #2407
1.42K