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

Use SmallVec more often in the parser to avoid small heap allocations #33

Closed
DaniPopes opened this issue Jul 13, 2024 · 0 comments · Fixed by #31
Closed

Use SmallVec more often in the parser to avoid small heap allocations #33

DaniPopes opened this issue Jul 13, 2024 · 0 comments · Fixed by #31
Labels
A-parser Area: parsing source code to an AST C-perf Category: an issue highlighting optimization opportunities or PRs implementing such E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. P-low Low priority

Comments

@DaniPopes
Copy link
Member

Describe the feature

We currently parse most lists and sequences of stuff using Vec, however in general most lists are at most a few elements long, so we should use SmallVec with 4 or 8 inline capacity to avoid allocating on the heap.

Additional context

No response

@DaniPopes DaniPopes added C-perf Category: an issue highlighting optimization opportunities or PRs implementing such A-parser Area: parsing source code to an AST P-low Low priority E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. labels Jul 13, 2024
@DaniPopes DaniPopes added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. and removed E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. labels Jul 13, 2024
DaniPopes added a commit that referenced this issue Sep 26, 2024
- #32: Closes #15
- #36: Closes #33
- #42: Closes #41
- #46: Closes #28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: parsing source code to an AST C-perf Category: an issue highlighting optimization opportunities or PRs implementing such E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. P-low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant