Skip to content

Comments

Reduce allocations by reusing the String that holds the cell value#6

Merged
MonterraByte merged 1 commit intomasterfrom
reuse-string
Mar 13, 2025
Merged

Reduce allocations by reusing the String that holds the cell value#6
MonterraByte merged 1 commit intomasterfrom
reuse-string

Conversation

@MonterraByte
Copy link
Owner

Currently, the code allocates twice for every cell of the table. This commit changes it to allocate only once for the whole table (barring any reallocations necessary to grow the String), significantly reducing allocations (the only other place in the code that allocates is the BufWriter).

Currently, the code allocates twice for every cell of the table.
This commit changes it to allocate only once for the whole table
(barring any reallocations necessary to grow the String), significantly
reducing allocations (the only other place in the code that allocates
is the BufWriter).
@MonterraByte MonterraByte merged commit 2257c7d into master Mar 13, 2025
8 checks passed
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.

1 participant