-
Notifications
You must be signed in to change notification settings - Fork 36
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
Share Arc between wakers #171
Draft
matheus-consoli
wants to merge
2
commits into
yoshuawuyts:main
Choose a base branch
from
matheus-consoli:shared-arc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm still playing with this, and I expect it to be half broken, but we got good results so far! The current implementation is pretty much the same as the original PR, plus logic for the vec resizing - I still want to play and explore some ideas before documenting and merging to this code Preliminary results: >> critcmp main wakerarrayvec
group main wakerarrayvec
----- ---- -------------
array::join 10 1.18 824.8±8.57ns ? ?/sec 1.00 701.7±2.72ns ? ?/sec
array::join 100 1.25 10.4±0.10µs ? ?/sec 1.00 8.3±0.04µs ? ?/sec
array::join 1000 1.33 546.6±1.45µs ? ?/sec 1.00 412.0±1.67µs ? ?/sec
array::merge 10 1.11 1138.9±22.07ns ? ?/sec 1.00 1023.0±1.94ns ? ?/sec
array::merge 100 1.13 22.2±1.08µs ? ?/sec 1.00 19.6±0.06µs ? ?/sec
array::merge 1000 1.09 1023.5±137.46µs ? ?/sec 1.00 941.9±121.27µs ? ?/sec
array::race 10 1.00 500.2±2.29ns ? ?/sec 1.00 498.6±9.52ns ? ?/sec
array::race 100 1.00 5.4±0.02µs ? ?/sec 1.01 5.4±0.03µs ? ?/sec
array::race 1000 1.02 59.8±0.24µs ? ?/sec 1.00 58.4±0.33µs ? ?/sec
compare array::merge vs select!/futures-concurrency/10 1.17 1138.8±12.95ns ? ?/sec 1.00 973.6±5.94ns ? ?/sec
compare array::merge vs select!/futures-rs/10 1.00 3.0±0.02µs ? ?/sec 1.01 3.0±0.04µs ? ?/sec
compare vec::join vs join_all/futures-concurrency/10 1.07 1059.2±3.31ns ? ?/sec 1.00 991.5±3.36ns ? ?/sec
compare vec::join vs join_all/futures-concurrency/100 1.17 17.4±0.22µs ? ?/sec 1.00 14.9±0.05µs ? ?/sec
compare vec::join vs join_all/futures-concurrency/1000 1.08 1087.7±2.49µs ? ?/sec 1.00 1009.3±13.88µs ? ?/sec
compare vec::join vs join_all/futures-rs/10 1.01 1046.4±4.20ns ? ?/sec 1.00 1031.2±6.20ns ? ?/sec
compare vec::join vs join_all/futures-rs/100 1.03 14.1±0.05µs ? ?/sec 1.00 13.6±0.03µs ? ?/sec
compare vec::join vs join_all/futures-rs/1000 1.04 159.4±0.75µs ? ?/sec 1.00 153.6±0.76µs ? ?/sec
future_group/FutureGroup/10 1.11 947.3±37.87ns ? ?/sec 1.00 856.3±15.87ns ? ?/sec
future_group/FutureGroup/100 1.12 9.6±0.04µs ? ?/sec 1.00 8.6±0.06µs ? ?/sec
future_group/FutureGroup/1000 1.12 112.7±1.09µs ? ?/sec 1.00 100.7±0.56µs ? ?/sec
future_group/FuturesUnordered/10 1.04 804.9±48.12ns ? ?/sec 1.00 774.7±43.95ns ? ?/sec
future_group/FuturesUnordered/100 1.01 8.1±0.48µs ? ?/sec 1.00 7.9±0.36µs ? ?/sec
future_group/FuturesUnordered/1000 1.08 99.7±49.14µs ? ?/sec 1.00 92.8±6.77µs ? ?/sec
stream_group/SelectAll/10 1.04 1298.7±34.38ns ? ?/sec 1.00 1247.4±32.73ns ? ?/sec
stream_group/SelectAll/100 1.01 13.1±0.44µs ? ?/sec 1.00 12.9±0.44µs ? ?/sec
stream_group/SelectAll/1000 1.03 147.0±25.75µs ? ?/sec 1.00 142.8±22.50µs ? ?/sec
stream_group/StreamGroup/10 1.12 1168.3±31.06ns ? ?/sec 1.00 1043.9±12.51ns ? ?/sec
stream_group/StreamGroup/100 1.09 11.7±0.10µs ? ?/sec 1.00 10.7±0.05µs ? ?/sec
stream_group/StreamGroup/1000 1.09 132.1±1.08µs ? ?/sec 1.00 121.3±0.79µs ? ?/sec
tuple::join 10 1.14 871.3±10.08ns ? ?/sec 1.00 763.3±30.53ns ? ?/sec
tuple::merge 10 1.10 1090.5±1.99ns ? ?/sec 1.00 990.0±2.71ns ? ?/sec
tuple::race 10 1.05 487.6±6.53ns ? ?/sec 1.00 465.0±1.32ns ? ?/sec
vec::join 10 1.02 1057.3±8.89ns ? ?/sec 1.00 1038.4±3.33ns ? ?/sec
vec::join 100 1.03 16.1±0.08µs ? ?/sec 1.00 15.7±0.08µs ? ?/sec
vec::join 1000 1.00 959.0±11.73µs ? ?/sec 1.12 1077.0±2.02µs ? ?/sec
vec::merge 10 1.08 1433.9±8.84ns ? ?/sec 1.00 1324.3±12.26ns ? ?/sec
vec::merge 100 1.04 28.5±1.12µs ? ?/sec 1.00 27.5±0.18µs ? ?/sec
vec::merge 1000 1.00 1698.0±25.06µs ? ?/sec 1.04 1759.2±5.77µs ? ?/sec
vec::race 10 1.03 548.2±2.13ns ? ?/sec 1.00 532.0±3.65ns ? ?/sec
vec::race 100 1.00 5.8±0.04µs ? ?/sec 1.04 6.1±0.09µs ? ?/sec
vec::race 1000 1.02 62.9±0.16µs ? ?/sec 1.00 61.4±0.20µs ? ?/sec |
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.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adapt part of #118 to our current codebase and explore alternatives.