-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Adding inline functions in the generated headers may bring a performance benefit.
But this could be at the cost of increased build times and generated code size of code that uses the functions (if the inline functions are used in many places). Typically only small functions are inlined for that reason (for example: setter and getters, small constructors, small assignment and small destructors functions).
So an experiment may be needed to decide if the change is a good idea or not.
Note that the prototype emitter did inline everything whereas the old cpp emitter and rds emitted for classic did not do any inlining (if I am not mistaken).
It could even be an optional feature (enabled via command line switch), although I do think we should limit the amount of options.
It may not be that hard to test inlining versus non-inlining, because the propotype did inline everything. And the benchmark code used to test the difference between almagation and non-almagation may be reusable/extendable.
Of course the build must be done with optimizations turned on (-O2 is what we typically use).