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

refactor: reduce memory allocations in AddChars() #315

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

falconandy
Copy link
Contributor

@falconandy falconandy commented Dec 4, 2024

Hi. This simple PR should help to reduce memory allocations in AddChars() function.

My test case:

before

BenchmarkGenerateDocument-16    30    38637542 ns/op    23502649 B/op    320497 allocs/op

after

BenchmarkGenerateDocument-16    31    34976746 ns/op    18924331 B/op    205436 allocs/op

@oneplus1000 oneplus1000 merged commit 02f9722 into signintech:master Dec 7, 2024
2 checks passed
@oneplus1000
Copy link
Collaborator

thank you

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