Hello,
I’m sorry if this question is already discussed, couldn’t find anything.
Ok, here is the thing…I build my games using IL2CPP and pretty happy with this in spite of troubles which popup from time to time.
In one of these games - Match3 - I have logic which is looking for combinations and other stuff which is basically algorithms/calcs and so on. You may probably think that this is not a big deal and that’s not very performance depending code. But when you connect AI which tests/plays this logic and call it thousands times during calculation of better move then it (logic) is getting extremely performance depending.
I’m not gonna discuss all my algorithms here because of this is out of my question. Let’s just assume that all these algorithms were optimized as much as possible using C#.
The question is: if I move some of my logic, like iterations through arrays and etc to native c++ plugin will it boost my performance comparing to IL2CPP?
I know there’s no 100% guarantee until you see source code but hypothetically… let’s just assume we are talking about huge iteration through array.
I’ve seen some articles where people do benchmarks of native plugin in Unity Editor which is ridiculous imho. Of course array initialization and iteration will be faster in native part comparing to editor’s mono with all this managed things.
Also (as far as I know) IL2CPP generates native code for us which is better for performance but it actually emulate managed environment with its own garbage collector and stuff.
So here’s question: will my native c++ plugin with marshalling (btw what happens to marshalling when I build using IL2CPP) be faster comparing to c++ generated by IL2CPP.
sry for long question, Thanks!