Skip to content

Conversation

@nalimilan
Copy link
Member

@nalimilan nalimilan added docs This change adds or pertains to documentation collections Data structures holding multiple items, e.g. sets labels Nov 18, 2023
@matthias314
Copy link
Contributor

Since we are talking about the docstring for sizehint!, I would like to comment on the sentence

If `first` is true, then the reserved space is from the start of the collection, for ordered
collections.

(which is not changed at present). I don't find the phrase "reserved from the start of the collection" very clear. What about the following:

If the collection is ordered and `first` is `true`, then any additional space is reserved
before the start of the collection rather than after the end. This way, subsequent calls
to `pushfirst!` (instead of `push!`) may become faster.

@nalimilan
Copy link
Member Author

I've pushed a commit to apply the proposed changes.

@nalimilan nalimilan requested a review from petvana December 2, 2023 10:13
Co-authored-by: Petr Vana <petvana@gmail.com>
@nalimilan nalimilan requested a review from petvana December 10, 2023 17:21
@nalimilan nalimilan requested a review from petvana December 10, 2023 21:08
@nalimilan nalimilan merged commit 3accfe8 into master Dec 11, 2023
@nalimilan nalimilan deleted the nl/sizehintdocs branch December 11, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

collections Data structures holding multiple items, e.g. sets docs This change adds or pertains to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants