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: prealloc slices with known sizes #8892

Merged
merged 2 commits into from
Jun 24, 2022
Merged

Conversation

Jorropo
Copy link
Contributor

@Jorropo Jorropo commented Apr 15, 2022

Often thoses are small slices and that cuts down the number of (small) allocations from 2~7 to 1. This is consistent too, always only gets 1.

@Jorropo Jorropo requested a review from lidel April 15, 2022 19:11
@Jorropo Jorropo self-assigned this Apr 15, 2022
@Jorropo Jorropo force-pushed the prealloc branch 2 times, most recently from ab4d9f5 to 4101a07 Compare April 15, 2022 19:33
Often thoses are small slices and that cuts down the number of (small) allocations from 2~7 to 1. This is consistent too, always only gets 1.
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (I missclicked and merged master into this branch, so will do automerge with squash if all tests pass)

@lidel lidel enabled auto-merge (squash) June 24, 2022 20:11
@lidel lidel merged commit 6602dd7 into ipfs:master Jun 24, 2022
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