-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
add a section on performance to collection docs #21217
Conversation
I guess another open question is if |
Also there's I guess a choice of |
//! important operations. For further details, see each type's documentation. | ||
//! | ||
//! Throughout the documentation, we will follow a few conventions. For all operations, | ||
//! the collection's size is denoted by n. If another collection is involved in the operation, it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably have graves around the 'n'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I wasn't sure about this. Ideally I would use mathmode, but we don't support it. Making all the math codemode is a bit weird looking.
- O(min(i, n-i))
O(min(i, n-i))
- O(min(i, n-i))
- O(min(i, n-i))
I like it. |
Not sure on what *exactly* should be said here, but I think this is the most important bit. This PR also establishes conventions for describing performance minimally. I suggest to describe preformance for individual methods we use a `# Performance` heading. Not sure if we should have ``` # Performance: O(1) details details ``` or ``` # Performance: O(1) details details ``` Since I think most methods don't need discussion, the former seems more resonable. But it's kind of weird to have info "in" the heading. r? @steveklabnik
Not sure on what exactly should be said here, but I think this is the most important bit. This PR also establishes conventions for describing performance minimally.
I suggest to describe preformance for individual methods we use a
# Performance
heading. Not sure if we should haveor
Since I think most methods don't need discussion, the former seems more resonable. But it's kind of weird to have info "in" the heading.
r? @steveklabnik