3 ms·
That 20% speed boost on iOS through inlining seems more than reason enough. Can you go in to more detail? Why isn't the C# compiler smart enough to do this?
by teamonkey 13y ago
That 20% speed boost on iOS through inlining seems more than reason enough. Can you go in to more detail? Why isn't the C# compiler smart enough to do this?
- jdk 13y agoC# chose to leave this up to the JIT/VM to implement, rather than compiler. Both Microsoft and Mono's .NET runtime will choose to inline functions based on some heuristics. (see http://stackoverflow.com/questions/473782/inline-functions-in-c http://stackoverflow.com/questions/473782/inline-functions-i...). However, the (old, forked) version of Mono used by Unity does not appear to inline functions - at least not when using the ahead-of-time compilation required to run on iOS.