Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@CaseyCarter

Description

@CaseyCarter

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.

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