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

cgen, scanner: reduce allocations for the most common cases #22142

Conversation

spytheman
Copy link
Member

  • scanner: avoid new allocations, while scanning strings with no escapes
  • cgen: avoid string interpolation in Gen.new_tmp_var/0

@spytheman spytheman changed the title reduce allocations for common cases in cgen and scanner cgen, scanner: reduce allocations for the most common cases Aug 31, 2024
@medvednikov
Copy link
Member

The re-write is going to use arena allocation, like the D compiler.

@JalonSolov
Copy link
Contributor

Still good to improve what we have, since the rewrite is taking a while.

@spytheman spytheman merged commit 8a9abbb into vlang:master Sep 1, 2024
75 checks passed
@spytheman spytheman deleted the reduce_allocations_for_common_cases_in_cgen_and_scanner branch September 1, 2024 04:56
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.

3 participants