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

fix(compiler): Reduce stack usage when allocating lists #2214

Merged
merged 3 commits into from
Dec 29, 2024

Conversation

ospencer
Copy link
Member

Fixes #2109

This allows list literals with up to ~3000 elements when the compiler is compiled to JS and running on Node.

Tested native, 50k elements without issue. If we want a test for this, I'd keep it to just a few hundred elements.

@ospencer ospencer self-assigned this Dec 13, 2024
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slick

Copy link
Member

@spotandjake spotandjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, I do feel like we should have a regression test for this either testing some sane list sizes or that only runs on release or something (I imagine we will go with the former since we don't have any infra for release only tests at the moment).

@ospencer
Copy link
Member Author

Added a test.

@ospencer ospencer enabled auto-merge December 28, 2024 23:39
@ospencer ospencer added this pull request to the merge queue Dec 29, 2024
Merged via the queue into main with commit cad45e4 Dec 29, 2024
12 checks passed
@ospencer ospencer deleted the oscar/opt-js-list branch December 29, 2024 03:26
@github-actions github-actions bot mentioned this pull request Dec 29, 2024
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.

Improve compilation of large list/array literals
3 participants