Skip to content
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

Add ThreadsX.mapi #162

Merged
merged 9 commits into from
Oct 9, 2020
Merged

Add ThreadsX.mapi #162

merged 9 commits into from
Oct 9, 2020

Conversation

tkf
Copy link
Owner

@tkf tkf commented Oct 9, 2020

close #161

require JuliaFolds/Transducers.jl#431

Commit Message

Add ThreadsX.mapi: threaded map with purely sequential iterators (#162)

This PR uses NondeterministicThreading added in
JuliaFolds/Transducers.jl#431 to implement
threaded map that does not use SplittablesBase.halve.

@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #162 into master will decrease coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
- Coverage   80.66%   80.53%   -0.14%     
==========================================
  Files           9        9              
  Lines         450      452       +2     
==========================================
+ Hits          363      364       +1     
- Misses         87       88       +1     
Impacted Files Coverage Δ
src/ThreadsX.jl 0.00% <ø> (-50.00%) ⬇️
src/map.jl 96.15% <100.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b36e778...1dddaa4. Read the comment docs.

mergify bot pushed a commit to JuliaFolds/Transducers.jl that referenced this pull request Oct 9, 2020
This PR adds `NondeterministicThreading` transducer that parallelizes
only the inner transducer and reducing function.  This is for
preparing for a threaded `map` implementation that does not require
`halve` to be implemented: tkf/ThreadsX.jl#162
@tkf
Copy link
Owner Author

tkf commented Oct 9, 2020

ID time GC time memory allocations
... ... ... ... ...
["mapi", "collatz", "base"] 297.872 ms (5%) 7.63 MiB (1%) 2
["mapi", "collatz", "tx"] 197.858 ms (5%) 5.070 ms 156.05 MiB (1%) 2016660
["mapi", "consume-100us", "base"] 2.000 ms (5%) 240 bytes (1%) 1
["mapi", "consume-100us", "tx"] 1.215 ms (5%) 58.61 KiB (1%) 1099
["mapi", "consume-1ms", "base"] 20.001 ms (5%) 240 bytes (1%) 1
["mapi", "consume-1ms", "tx"] 10.383 ms (5%) 59.66 KiB (1%) 1121
... ... ... ... ...

--- https://github.com/tkf/ThreadsX-data/blob/benchmark-results/2020/10/09/020052/result.md

@tkf tkf marked this pull request as ready for review October 9, 2020 04:47
@mergify mergify bot merged commit 6a69562 into master Oct 9, 2020
@mergify mergify bot deleted the mapi branch October 9, 2020 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map with purely sequential iterators
1 participant