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

<queue>: priority_queue::push_range could conditionally push_heap #2826

Closed
CaseyCarter opened this issue Jun 27, 2022 · 0 comments · Fixed by #4025
Closed

<queue>: priority_queue::push_range could conditionally push_heap #2826

CaseyCarter opened this issue Jun 27, 2022 · 0 comments · Fixed by #4025
Labels
fixed Something works now, yay! performance Must go faster

Comments

@CaseyCarter
Copy link
Member

See discussion at #2806 (comment).

When inserting a small number of elements k into a large priority_queue, make_heap's complexity of 3N can be greater than consecutive calls to push_heap (k log N). We need to determine what the actual relationship is given our implementation's constant factors, and further determine if we believe the potential perf improvement is worth the cost of additional codesize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Something works now, yay! performance Must go faster
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants