Skip to content

Conversation

AdityaHarindar
Copy link

@AdityaHarindar AdityaHarindar commented Oct 28, 2019

This reduces the number of allocations made to the underlying array, while append() attempts to 'grow' the slice beyond its initial capacity

@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/203722.
After addressing review feedback, remember to publish your drafts!

This reduces the number of allocations made to the underlying array, while append() attempts to 'grow' the slice beyond its initial capacity
@gopherbot
Copy link
Contributor

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 comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from aditya harindar:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/203722.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 2:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/203722.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from aditya harindar:

Patch Set 3:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/203722.
After addressing review feedback, remember to publish your drafts!

@bcmills bcmills changed the title Add capacity to slice creation, when capacity is known create slice with capacity, when capacity is known Nov 5, 2019
@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/203722.
After addressing review feedback, remember to publish your drafts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants