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

Types and Optimisation #49

Open
iwillspeak opened this issue Nov 13, 2021 · 0 comments
Open

Types and Optimisation #49

iwillspeak opened this issue Nov 13, 2021 · 0 comments
Labels
feature New feature or request Roadmap Larger scale planned feature or tracking issue

Comments

@iwillspeak
Copy link
Owner

iwillspeak commented Nov 13, 2021

At some point it would be nice to support optimisations. I think that some form of gradual typing / type inference would help here. For many scheme expressions the latent / dynamic type can be inferred at compile time. This would then allow for further optimsations and improvements.

  • Constant foldig
  • Direct calling to target methods avoiding the Func<object[], object> if argument types are known
  • Liveness tracking and escape analysis?

Some of this could be driven by the idea of 'type predicates' (integer?, vector?, etc. ) in a manner similar to TypeScript.
There is also discussion of 'assumptions': https://srfi.schemers.org/srfi-145/srfi-145.html that might be useful to enable more powerful optimisations in a given block.

@iwillspeak iwillspeak added feature New feature or request Roadmap Larger scale planned feature or tracking issue labels Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Roadmap Larger scale planned feature or tracking issue
Projects
None yet
Development

No branches or pull requests

1 participant