Skip to content

perf(generate): reserve more Vec capacities#4615

Merged
WillLillis merged 1 commit intotree-sitter:masterfrom
WillLillis:more_reserve
Jul 17, 2025
Merged

perf(generate): reserve more Vec capacities#4615
WillLillis merged 1 commit intotree-sitter:masterfrom
WillLillis:more_reserve

Conversation

@WillLillis
Copy link
Member

@WillLillis WillLillis commented Jul 15, 2025

Some more small perf wins, this just reserves a few more Vec capacities up front before they're pushed to.

tree-sitter-c (3.3%):
image

tree-sitter-ocaml (4.2%):
image

@WillLillis WillLillis merged commit 0f79c61 into tree-sitter:master Jul 17, 2025
18 checks passed
@WillLillis WillLillis deleted the more_reserve branch July 17, 2025 05:52
wow49

This comment was marked as spam.

wow49

This comment was marked as spam.

@tree-sitter tree-sitter locked as resolved and limited conversation to collaborators Jul 17, 2025
@clason clason added parser-generation Related to `tree-sitter generate` perf Performance related ci:backport release-0.25 Backport label labels Jul 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ci:backport release-0.25 Backport label parser-generation Related to `tree-sitter generate` perf Performance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants