Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upParallelExtend with map-reduce #479
Conversation
cuviper
added some commits
Nov 20, 2017
This comment has been minimized.
This comment has been minimized.
|
bors r+ |
bors bot
added a commit
that referenced
this pull request
Nov 21, 2017
This comment has been minimized.
This comment has been minimized.
bors
bot
merged commit 8b7c0e7
into
rayon-rs:master
Nov 21, 2017
2 checks passed
bors
Build succeeded
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
This comment has been minimized.
This comment has been minimized.
|
That's awesome. Nice write-up. |
cuviper
deleted the
cuviper:extend_map_reduce
branch
Oct 18, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
cuviper commentedNov 21, 2017
We were using a
LinkedList<Vec<_>>intermediary for generalParallelExtendimplementations, gathered using afoldto a vector andcollectthe list -- effectively afold-fold-reduce. Now we explicitlyfold-map-reduceit for better performance.Thanks to @bluss for ridiculing the use of😄
LinkedList, which got me to look at this again. At first I triedVec<Vec<_>>instead, which did perform better, but I had to do this usingfold-map-reduceto avoid infinitecollectrecursion. Then I tried that same tweak on the original code, finding it slightly better yet. So I stand by the use ofLinkedList.