Skip to content

parallel iter for combinations? #719

Open
@ian-p-cooke

Description

@ian-p-cooke

I'm currently using https://docs.rs/itertools/0.8.2/itertools/trait.Itertools.html#method.combinations and found a great speed-up by collecting into a Vec and then using into_par_iter. I'm wondering if that's the best way though? Is there a way to avoid the collect?

example:

items.combinations(4)
        .collect::<Vec<Vec<Item>>>()
        .into_par_iter()
        .for_each(|_| blah)

I'm amenable to implementing whatever's necessary for 'native' par_iter support for the Combinations struct but could use a pointer to documentation if that's available.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions