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

Unboxed primitive fn signatures #47

Open
jeaye opened this issue Oct 7, 2023 · 0 comments
Open

Unboxed primitive fn signatures #47

jeaye opened this issue Oct 7, 2023 · 0 comments

Comments

@jeaye
Copy link
Collaborator

jeaye commented Oct 7, 2023

Clojure supports unboxed signatures for fns with up to 4 params. jank can do the same thing, but it comes in two steps:

  1. We support type hints on fns and generate the appropriate primitive version
  2. When we already have the type/box info for each param, we can generate code to invoke accordingly

Right now, jank tracks boxing info, but not type info. This may be required, if we support unboxed things which aren't numbers. I'm not yet sure if we will.

Alex Miller covers an example of this here: https://youtu.be/s_xjnXB994w?t=2529

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