Skip to content

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

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!performanceMust go faster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions