Skip to content

Generated Code Optimization: Remove redundant functions #19

@Yeah69

Description

@Yeah69

There is potential for optimizing the size of the generated code by resolving redundancies with generated functions.

An example:

  • The implementation class Foo gets several create-functions generated, because on different occasions different sets of overrides are active
    • One for overrides of type string & int
    • The other for string & long
  • Now, after building the resolution graph it can turn out that in neither case int nor long is used at all
  • So if we remove the override of type int on the one function and long on the other, then both of them are semantically equal.
  • So one can replace the other

Such an optimization would mean to at least optimizing a half of the code for such cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-generation-optimizationRefactoring which on success should decrease the size of the generated code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions