-
Notifications
You must be signed in to change notification settings - Fork 207
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
create slice with capacity, when capacity is known #5
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: da3a7cb) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/playground/+/203722 to see it. Tip: You can toggle comments from me using the |
Message from Bryan C. Mills: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/203722. |
This reduces the number of allocations made to the underlying array, while append() attempts to 'grow' the slice beyond its initial capacity
This PR (HEAD: d25b90c) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/playground/+/203722 to see it. Tip: You can toggle comments from me using the |
Message from aditya harindar: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/203722. |
Message from Bryan C. Mills: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/203722. |
Message from aditya harindar: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/203722. |
Message from Bryan C. Mills: Patch Set 4: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/203722. |
This reduces the number of allocations made to the underlying array, while append() attempts to 'grow' the slice beyond its initial capacity