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

[performance] minimise log field allocations #3529

Conversation

NyaaaWhatsUpDoc
Copy link
Member

  • moves slice functions to separate internal/util/xslices package to fix an import cycle
  • adds new xslices.AppendJust() and xslices.GrowJust() functions to grow a slice in similar manners to append() and slices.Grow() but ONLY by the necessary number of elements, not any extra as normally happens in those functions typically
  • makes use of xslices.AppendJust() and xslices.GrowJust() in our log package

@tsmethurst
Copy link
Contributor

Looks good to me :)

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc merged commit e3c2b79 into superseriousbusiness:main Nov 11, 2024
3 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.

2 participants