Skip to content

Implementation in header versus source #106

@reinco

Description

@reinco

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions