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

[chore] add some more slice related utility functions + remove duplicates #3149

Conversation

NyaaaWhatsUpDoc
Copy link
Member

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc commented Jul 29, 2024

got bored so decided to add some more useful utility functions. i know we're already doing some of the functionality provided by these in areas of the codebase so in time they can probably be updated to use these.

the advantage of these functions being that they're optimized to minimize number of append() type calls which allocate new slice lengths when needed. these functions try to allocate as much up-front as possible.

@tsmethurst tsmethurst merged commit 47c2681 into superseriousbusiness:main Jul 30, 2024
2 checks passed
@tsmethurst
Copy link
Contributor

Handy!

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