You can now tag functions with the "inline" keyword to inline them.
Code: Select all
inline float min(float v1, float v2) {
return v1 <= v2 ? v1 : v2;
}
The is a new option "Enable function inlining" in Project menu. When this is option is off, functions marked with "inline" will not be inlined. This is to make it easy to quickly do speed comparisons.
This works best on small functions that are called from inside a loop (so don't go and tag every function with "inline", use it carefully).
I've noticed 2x speedups on some tests using this (see attached demo which shows execution time in ms). There might be bugs so please test.