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

shuffle vec/array/tuple futures/streams for benchmark #117

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

wishawa
Copy link
Contributor

@wishawa wishawa commented Jan 9, 2023

This PR shuffles the CountdownFutures and CountdownStreams used in the benchmark, exposing the bigger-than-linear growth in runtime as the number of subfutures increase.

$ critcmp after before
group                after                                  before
-----                -----                                  ------
array::join 10       1.43      2.5±0.06µs        ? ?/sec    1.00  1727.5±54.00ns        ? ?/sec
array::join 100      1.75     27.5±0.40µs        ? ?/sec    1.00     15.7±0.33µs        ? ?/sec
array::join 1000     7.99  1423.9±39.19µs        ? ?/sec    1.00    178.3±2.53µs        ? ?/sec
array::merge 10      1.37      3.1±0.10µs        ? ?/sec    1.00      2.3±0.03µs        ? ?/sec
array::merge 100     1.00     53.4±0.94µs        ? ?/sec    1.37     73.0±4.45µs        ? ?/sec
array::merge 1000    1.00      2.7±0.05ms        ? ?/sec    1.57      4.2±0.08ms        ? ?/sec
array::race 10       1.35  1164.3±33.54ns        ? ?/sec    1.00   859.3±14.34ns        ? ?/sec
array::race 100      1.73     13.0±0.29µs        ? ?/sec    1.00      7.6±0.12µs        ? ?/sec
array::race 1000     1.96   152.0±10.51µs        ? ?/sec    1.00     77.6±1.39µs        ? ?/sec
tuple::join 10       1.52      2.5±0.04µs        ? ?/sec    1.00  1647.1±34.54ns        ? ?/sec
tuple::merge 10      1.09      3.2±0.04µs        ? ?/sec    1.00      2.9±0.05µs        ? ?/sec
tuple::race 10       1.33  1174.0±31.44ns        ? ?/sec    1.00   883.2±60.63ns        ? ?/sec
vec::join 10         1.43      2.8±0.02µs        ? ?/sec    1.00  1992.8±56.60ns        ? ?/sec
vec::join 100        2.33     44.4±2.02µs        ? ?/sec    1.00     19.1±0.47µs        ? ?/sec
vec::join 1000       10.26 1922.1±63.21µs        ? ?/sec    1.00   187.4±10.52µs        ? ?/sec
vec::merge 10        1.30      3.7±0.05µs        ? ?/sec    1.00      2.8±0.06µs        ? ?/sec
vec::merge 100       1.00     74.7±2.26µs        ? ?/sec    1.11     83.1±2.05µs        ? ?/sec
vec::merge 1000      1.00      4.4±0.26ms        ? ?/sec    1.39      6.1±0.10ms        ? ?/sec
vec::race 10         1.44  1252.1±40.15ns        ? ?/sec    1.00   872.1±12.69ns        ? ?/sec
vec::race 100        1.56     12.2±0.25µs        ? ?/sec    1.00      7.8±0.43µs        ? ?/sec
vec::race 1000       2.01    134.7±2.76µs        ? ?/sec    1.00     67.0±1.37µs        ? ?/sec

@wishawa wishawa changed the title shuffle vec/array/tuple futures/streams for benchmark (with a fixed s… shuffle vec/array/tuple futures/streams for benchmark Jan 9, 2023
@wishawa
Copy link
Contributor Author

wishawa commented Jan 30, 2023

@yoshuawuyts @matheus-consoli Could this and #118, #119 get reviewed? I want to make a crates.io release of a dependant soon and want to have the best join performance.

Copy link
Collaborator

@matheus-consoli matheus-consoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to make sense, thank you!
I'll try to review #118 tomorrow.

benches/utils/countdown_futures.rs Outdated Show resolved Hide resolved
@yoshuawuyts yoshuawuyts merged commit c234bb3 into yoshuawuyts:main Feb 9, 2023
}
}
impl Eq for PrioritizedWaker {
fn assert_receiver_is_total_eq(&self) {}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional?

Suggested change
fn assert_receiver_is_total_eq(&self) {}

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.

4 participants