Skip to content

Can I use mapConcurrently with afterwards sorting the results of the list? #148

@Oleksandr-Zhabenko

Description

@Oleksandr-Zhabenko

Actually, I can. But it looks like the main benefit of the using mapConcurrently for me in the case -- the speed up of overall computations disappears, the resulting sorted list is obtained not faster than just from simple mapM with no asynchronous operations. This is the case when sorting is done either in the strict manner (even with force from deepseq) or lazy (the default one).

Intuitively, the function pipe of mapConcurrently and sort should give the results approximately in the same time, as sum of both mapConcurrently and sort alone, no matter of further their usage by sorting or just printing to the IO stream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions