Skip to content

Improved parallel foreach amap #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Sep 4, 2011

Conversation

dsimcha
Copy link
Collaborator

@dsimcha dsimcha commented Aug 25, 2011

Massive improvements to the implementation of parallel foreach and amap. When working on std.parallel_algorithm, I discovered a way of doing these that was so much simpler, more elegant, more efficient and less bug-prone that I wanted to completely rip up the old implementation. Also, a few minor cleanups:

  1. amap now can use any random access assignable range for output, not just an array.
  2. map now statically disallows the buffer recycling overload of asyncBuf as input, since this never worked correctly.
  3. Improved memory management for reduce to avoid the GC.

dsimcha and others added 5 commits August 18, 2011 10:11
…Buf and disallow using this overload with map because it's not safe. At some point it may be possible to special-case this overload of asyncBuf to work with map and parallel foreach, but until I decide what the best way to do that is and get around to implementing it, it should just be an error.
…ap. When working on std.parallel_algorithm, I discovered a way of doing these that was so much simpler, more elegant, more efficient and less bug-prone that I wanted to completely rip up the old implementation. Also, a few minor cleanups:

1.  amap now can use any random access assignable range for output, not just an array.

2.  map now statically disallows the buffer recycling overload of asyncBuf as input, since this never worked correctly.

3.  Improved memory management for reduce to avoid the GC.
…hat I forgot about during all the refactoring.
@dsimcha
Copy link
Collaborator Author

dsimcha commented Aug 29, 2011

Ping?

@dsimcha
Copy link
Collaborator Author

dsimcha commented Aug 30, 2011

Forgot to mention, this pull request makes use of my changes to std.range in the unittests. Do not merge until after the std.range pull is merged.

@dsimcha
Copy link
Collaborator Author

dsimcha commented Sep 2, 2011

Ok, I put some tests in for exception handling, and cleaned up a little cruft.

@dsimcha
Copy link
Collaborator Author

dsimcha commented Sep 3, 2011

This pull request now also contains an important bug fix (for Bug 6587) to allow Task to be used with const/immutable. I'd really like to get this into next release because it's a massive improvement to std.parallelism.

andralex added a commit that referenced this pull request Sep 4, 2011
@andralex andralex merged commit 5b0c8d5 into dlang:master Sep 4, 2011
kuettler pushed a commit to kuettler/phobos that referenced this pull request Feb 6, 2018
Handle empty issue list more gently + avoid fetching the git remote directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants