Skip to content

Compiler: add an optimization step #102

@timfennis

Description

@timfennis

After compilation is done we should do an optimization step. The most obvious optimization that we can do is Push (such as unit) immediately followed by Pop can be safely removed. This fixes lots of unit popping that everything being an expression introduces.

Ideas

  • The optimizer should be modular and extensible
  • It should not affect the tests that test the compiler
  • It should keep track of how much work it removed (nice stats)
  • You should be able to disable it from the CLI to compare performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions