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

A useful closure + fn pointer optimization #43

Closed
1 task done
cdstanford opened this issue Aug 30, 2023 · 1 comment
Closed
1 task done

A useful closure + fn pointer optimization #43

cdstanford opened this issue Aug 30, 2023 · 1 comment
Labels
roadmap-v0 On the current roadmap

Comments

@cdstanford
Copy link
Collaborator

cdstanford commented Aug 30, 2023

(moving this a new thread so we can tag it roadmap-v1, c.f. #34)

Just discussed this with David, false positives for closure creation seem to come up commonly, e.g. for closures like |x| x + 1 which are quite common.

An extremely useful optimization we should do here is:

  • if the closure contains no effects inside it -- so absolutely no effects are possible when called -- skip adding the ClosureCreation effect.
@cdstanford cdstanford changed the title Closure + Function pointer examples An important losure + Function pointer optimization Aug 30, 2023
@cdstanford cdstanford changed the title An important losure + Function pointer optimization A useful closure + Function pointer optimization Aug 30, 2023
@cdstanford cdstanford added the roadmap-v0 On the current roadmap label Aug 30, 2023
@cdstanford cdstanford changed the title A useful closure + Function pointer optimization A useful closure + fn pointer optimization Aug 30, 2023
@cdstanford
Copy link
Collaborator Author

done in 9f45ed7, thanks @lzoghbi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap-v0 On the current roadmap
Projects
None yet
Development

No branches or pull requests

1 participant