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

Inner functions allocate #51511

Closed
PallHaraldsson opened this issue Sep 29, 2023 · 1 comment
Closed

Inner functions allocate #51511

PallHaraldsson opened this issue Sep 29, 2023 · 1 comment

Comments

@PallHaraldsson
Copy link
Contributor

I had an inner helper function (for factorial) that allocates, even in tail position. I'm not sure why, since the code worked function when moved out to no longer be nested.

Is it a bug in Julia? I fail to see the need for allocation (except on the stack, and even not needed then with TCO macro). Is it maybe needed when not in tail position?

Fixing this might help against Mojo... though I think it's winning there because it has TCO my default.

@KristofferC
Copy link
Sponsor Member

Dup of #15276? Anyway, needs some kind of reproducer to do anything about.

This issue was closed.
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

No branches or pull requests

2 participants