Skip to content

Conversation

ayuhito
Copy link
Contributor

@ayuhito ayuhito commented Sep 18, 2025

Not very impactful, but why not. Each concat is a separate heap allocation that is discarded by GC, so strings.Builder is a little bit more hygienic for this use case especially since we are appending in an unknown loop.

@taniabogatsch taniabogatsch merged commit 3bb42fd into marcboeker:main Sep 18, 2025
17 checks passed
@taniabogatsch
Copy link
Collaborator

Thanks! Reducing heap allocations is great - even though, like you said, this is probably not the most performance-critical code path.

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.

2 participants