[IL2CPP on iOS] Native vs. Managed performance

We have built a simple app to test performance between the following on mobile and desktop using IL2CPP for all platforms:
0. Native with type marshaling instead of pointers (C++ / C#)

  1. Native with unsafe pointers instead of type marshaling (C++ / C#)
  2. Managed only (C# only)

On Android, Windows, and macOS, #0 is the slowest and #2 is the fastest. However on iOS, #2 is slower than #1.

Is there something different in how IL2CPP works on iOS as compared with other platforms?

It sounds like you might be the one person in this world best positioned to find out. Attach the profiler to the device and track down what the major differences are! For most of us, performance is adequate.

1 Like

There are no known performance issues or differences on iOS. But if you do discover something that we have not tested, please let us know, we would like to investigate it.

1 Like

Thanks Kurt! I tried profiling on iOS through both Unity and Instruments and have not yet found any concrete reason for this behavior.

Thanks Josh! I will keep this thread updated.