Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter optimizer #153

Open
Idorobots opened this issue May 27, 2021 · 1 comment
Open

Smarter optimizer #153

Idorobots opened this issue May 27, 2021 · 1 comment

Comments

@Idorobots
Copy link
Owner

Instead of merely looping optimizations around the optimizer should be smarter about selecting different optimizations to run.
For instance, it could run a gradient descent-like search in the space of optimized programs. Then the compiler optimizations can be guided with a specially crafted score function - either to minimize code size, or maximize performance.

@Idorobots
Copy link
Owner Author

Some things still to try:

  • Add a third "complexity" measure so that it prefers less complex code.
  • Add a fourth "further optimization potential" measure.
  • Run optimizations lazily and incrementally, so that there's no need to inline functions in a branch that is dead.
  • Perform a better reachabillity and escape analysis for better treatment of recursive functions.
  • Maintain free variable & usage counts incrementally, instead of recomputing them all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant