Skip to content

Potential Perf Opportunity: Remove collect on BTreeMap #1443

@eriktaubeneck

Description

@eriktaubeneck

I think this refactoring made it less efficient as you now need to collect the intermediates. I didn't think we need that, but you want to have a function, maybe you can make it borrowing from reports and producing an iterator, like this

fn group_report_pairs<'a, BK, V>(
    reports: &'a [PrfHybridReport<BK, V>],
) -> impl Iterator<Item = [AggregateableHybridReport<BK, V>; 2]>> + 'a

Originally posted by @akoshelev in #1434 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions