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

Better syntactic arity for fat pointer writes #760

Conversation

ncik-roberts
Copy link
Contributor

Change <-@ to have syntactic arity 2, not 1.

<-@ used to have syntactic arity 1, given that it is written as nested funs rather than a single fun with multiple parameters. In an upcoming version of OCaml 5, this difference will matter a little for performance, as the syntactic arity will start being used as the runtime arity. <-@ is usually applied to 2 arguments (I claim), so it's a little better for performance for it to have runtime arity 2 and therefore for those applications to be full applications.

This PR is a no-op for OCaml 5.1.1 and earlier.

@yallop
Copy link
Owner

yallop commented Jan 9, 2024

<-@ is usually applied to 2 arguments (I claim)

I'm willing to believe that. Thank you for the contribution, @ncik-roberts!

@yallop yallop merged commit 22edb2f into yallop:master Jan 9, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants