magiclantern_simplified
magiclantern_simplified copied to clipboard
Test making imath.h macros into functions
Generally, it's a bad idea to have macros that act like functions. Instead, use functions, and let the compiler optimise. You can force inline if you really want.
imath.h does this a lot. We use these frequently, e.g. MIN(), and we generally care more about size than speed. We use -Os, which is in conflict with macros forcing code to be duplicated.
We should test converting all the function-like macros to functions. How much size does it save, and how much, if any, performance does it cost?