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

Optimization pass epic #98

Open
1 of 21 tasks
jeaye opened this issue Oct 6, 2024 · 0 comments
Open
1 of 21 tasks

Optimization pass epic #98

jeaye opened this issue Oct 6, 2024 · 0 comments

Comments

@jeaye
Copy link
Member

jeaye commented Oct 6, 2024

General

  • Constant propagation
  • Constant folding (compile-time eval of pure expressions with literals)
    • Requires tracking pure fns

Vars

  • If a var is already dereferenced once in a fn, use that for every other call in that fn

Dead code elimination

  • Dead branches
  • Pure statements

Boxing

Startup

  • Group all fns into a single module to load
  • Box globals in static memory, not with the GC

Form rewriting

  • Auto-transient
  • Auto-transducer
  • Zero-cost map destructuring (see here)
  • General loop unrolling
  • Specific loop unrolling (i.e. get-in)
  • Faster str usage (a la stringer)

AOT-only

  • Direct linking (dynamic call)
  • Direct linking (direct call)
  • Unused var removal (includes defns)
  • Flag to elide var meta
  • Remove unused args from fns

References

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