Skip to content

Add slim dedicated implementation of Parallel loop APIs #57580

Closed as not planned

Description

@kg

#57283 made Parallel.Invoke/For/ForEach work in WASM but there's a lot of cruft attached, the ideal long term solution is a simple custom implementation that doesn't pull in unnecessary dependencies. This probably pairs well with a wasm implementation of PLINQ.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Aug 17, 2021
  2. added this to the 7.0.0 milestone on Aug 17, 2021
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Aug 17, 2021
  4. modified the milestones: 7.0.0, 8.0.0 on Jul 25, 2022
  5. stephentoub commented on Jan 21, 2023

    @stephentoub
    Member

    @kg, is this still something we might do or should we close it?

  6. kg commented on Jan 21, 2023

    @kg
    ContributorAuthor

    @kg, is this still something we might do or should we close it?

    I don't have the data I would need to answer this. I think it's a question of whether the normal parallel APIs have too much overhead (in both time and code size) on the current implementation. Do we have benchmarks for them that already run?

  7. stephentoub commented on Jan 26, 2023

    @stephentoub
    Member

    Do we have benchmarks for them that already run?

    I don't see any benchmarks for these in dotnet/performance.

  8. kg commented on Jan 26, 2023

    @kg
    ContributorAuthor

    I would lean towards not doing anything unless we hear feedback from users that it's necessary, especially since we will eventually have actual threading available and the slim version will not be useful in that scenario. These APIs have a lot of overhead in their design to begin with.

    We would have the ability to conditionally ship either the slim or non slim version depending on whether we have threads, at least. So if we build a slim implementation it won't make the threaded scenario worse.

  9. stephentoub commented on Jan 26, 2023

    @stephentoub
    Member

    SGTM.

  10. ghost locked as resolved and limited conversation to collaborators on Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions