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

Expose observable strategy_type #567

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

CorentinBT
Copy link
Contributor

No description provided.

Copy link
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 302.77 ns 2.16 ns 2.20 ns 0.98
Subscribe empty callbacks to empty observable via pipe operator 302.49 ns 2.16 ns 2.16 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 697.83 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1047.06 ns 3.45 ns 3.42 ns 1.01
concat_as_source of just(1 immediate) create + subscribe 2224.64 ns 121.31 ns 115.85 ns 1.05
defer from array of 1 - defer + create + subscribe + immediate 752.66 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2163.57 ns 59.19 ns 59.19 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3083.52 ns 32.40 ns 32.45 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 31340.84 ns 27704.69 ns 28082.11 ns 0.99
from array of 1000 - create + as_blocking + subscribe + new_thread 37578.89 ns 48630.62 ns 52442.36 ns 0.93

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1091.56 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 855.34 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 995.11 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 888.40 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1242.98 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 934.16 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1118.21 ns 17.59 ns 17.29 ns 1.02

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 286.07 ns 2.16 ns 2.17 ns 1.00
current_thread scheduler create worker + schedule 372.95 ns 5.86 ns 5.86 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 836.48 ns 57.11 ns 55.85 ns 1.02

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 855.61 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 941.79 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2329.55 ns 172.08 ns 171.47 ns 1.00
immediate_just+buffer(2)+subscribe 1566.90 ns 13.89 ns 13.58 ns 1.02
immediate_just+window(2)+subscribe + subscsribe inner 2379.37 ns 1105.64 ns 1096.13 ns 1.01

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 849.51 ns - - 0.00
immediate_just+take_while(true)+subscribe 859.83 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2038.84 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3487.43 ns 184.81 ns 185.39 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3653.68 ns 199.27 ns 185.85 ns 1.07
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 134.32 ns 132.85 ns 1.01
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3556.21 ns 1184.71 ns 987.81 ns 1.20
immediate_just(1) + zip(immediate_just(2)) + subscribe 2134.14 ns 211.39 ns 206.01 ns 1.03

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.54 ns 16.78 ns 16.87 ns 0.99

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1360.23 ns 13.89 ns 13.89 ns 1.00
basic sample with immediate scheduler 1392.75 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 938.56 ns 0.31 ns 0.31 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1069.50 ns 170.43 ns 130.64 ns 1.30

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1123.43 ns 5.43 ns 5.55 ns 0.98
Subscribe empty callbacks to empty observable via pipe operator 1132.07 ns 5.60 ns 5.50 ns 1.02

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 2312.02 ns 0.45 ns 0.44 ns 1.02
from array of 1 - create + subscribe + current_thread 2908.46 ns 11.06 ns 10.93 ns 1.01
concat_as_source of just(1 immediate) create + subscribe 6961.55 ns 415.68 ns 418.27 ns 0.99
defer from array of 1 - defer + create + subscribe + immediate 2367.24 ns 0.28 ns 0.29 ns 0.96
interval - interval + take(3) + subscribe + immediate 6332.08 ns 94.37 ns 94.01 ns 1.00
interval - interval + take(3) + subscribe + current_thread 7921.50 ns 59.56 ns 59.62 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 66733.40 ns 60611.06 ns 54175.95 ns 1.12
from array of 1000 - create + as_blocking + subscribe + new_thread 77774.40 ns 72630.62 ns 64937.44 ns 1.12

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 3381.56 ns 0.28 ns 0.28 ns 1.01
immediate_just+filter(true)+subscribe 2565.32 ns 0.29 ns 0.29 ns 1.01
immediate_just(1,2)+skip(1)+subscribe 3320.85 ns 0.28 ns 0.28 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2502.47 ns 0.57 ns 0.56 ns 1.01
immediate_just(1,2)+first()+subscribe 4055.78 ns 0.29 ns 0.29 ns 0.99
immediate_just(1,2)+last()+subscribe 2980.26 ns 0.28 ns 0.28 ns 0.99
immediate_just+take_last(1)+subscribe 3677.03 ns 88.85 ns 72.76 ns 1.22

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 1022.86 ns 5.91 ns 5.77 ns 1.02
current_thread scheduler create worker + schedule 1366.59 ns 16.06 ns 15.93 ns 1.01
current_thread scheduler create worker + schedule + recursive schedule 2393.29 ns 182.23 ns 156.71 ns 1.16

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2561.07 ns 0.28 ns 0.28 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 2874.50 ns 0.58 ns 0.57 ns 1.01
immediate_just+flat_map(immediate_just(v*2))+subscribe 6653.52 ns 486.89 ns 467.64 ns 1.04
immediate_just+buffer(2)+subscribe 3122.21 ns 70.60 ns 73.95 ns 0.95
immediate_just+window(2)+subscribe + subscsribe inner 6725.05 ns 2745.62 ns 2763.58 ns 0.99

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2525.69 ns - - 0.00
immediate_just+take_while(true)+subscribe 2564.65 ns 0.29 ns 0.29 ns 0.99

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 6075.59 ns 0.28 ns 0.28 ns 1.01

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 9327.65 ns 519.39 ns 511.71 ns 1.02
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 10764.93 ns 541.71 ns 526.07 ns 1.03
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 532.45 ns 525.72 ns 1.01
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 9825.11 ns 2361.96 ns 2421.80 ns 0.98
immediate_just(1) + zip(immediate_just(2)) + subscribe 6594.59 ns 935.54 ns 928.89 ns 1.01

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 99.42 ns 63.39 ns 62.31 ns 1.02

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 3540.27 ns 39.27 ns 40.25 ns 0.98
basic sample with immediate scheduler 3549.77 ns 7.13 ns 7.15 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2937.24 ns 0.29 ns 0.28 ns 1.01

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 8443.26 ns 5124.08 ns 5040.16 ns 1.02

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 274.00 ns 0.88 ns 1.54 ns 0.57
Subscribe empty callbacks to empty observable via pipe operator 270.45 ns 0.88 ns 1.54 ns 0.57

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 569.77 ns 0.44 ns 0.31 ns 1.41
from array of 1 - create + subscribe + current_thread 787.90 ns 4.01 ns 4.01 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2437.39 ns 136.22 ns 135.20 ns 1.01
defer from array of 1 - defer + create + subscribe + immediate 779.00 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2228.26 ns 58.27 ns 58.26 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3151.10 ns 31.17 ns 31.19 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 26637.41 ns 26964.07 ns 27608.56 ns 0.98
from array of 1000 - create + as_blocking + subscribe + new_thread 39034.74 ns 35035.74 ns 33669.24 ns 1.04

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1146.41 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 862.37 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1093.17 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 870.76 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1373.95 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 1004.51 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1238.66 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 277.25 ns 0.88 ns 1.54 ns 0.57
current_thread scheduler create worker + schedule 396.37 ns 4.02 ns 4.01 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 851.06 ns 55.59 ns 56.13 ns 0.99

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 855.17 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 964.37 ns 0.62 ns 0.62 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2284.02 ns 136.11 ns 138.74 ns 0.98
immediate_just+buffer(2)+subscribe 1591.89 ns 13.89 ns 14.20 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2467.39 ns 876.95 ns 881.33 ns 1.00

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 843.76 ns - - 0.00
immediate_just+take_while(true)+subscribe 855.45 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1956.05 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3258.89 ns 160.15 ns 160.33 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3739.53 ns 147.22 ns 149.26 ns 0.99
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 141.31 ns 142.09 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3364.49 ns 852.85 ns 841.63 ns 1.01
immediate_just(1) + zip(immediate_just(2)) + subscribe 2278.38 ns 202.43 ns 205.37 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 54.08 ns 19.08 ns 18.98 ns 1.01

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1286.53 ns 11.12 ns 11.12 ns 1.00
basic sample with immediate scheduler 1309.17 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 995.72 ns 0.31 ns 0.31 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1040.01 ns 136.93 ns 134.65 ns 1.02

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 575.70 ns 4.01 ns 4.01 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 595.25 ns 4.01 ns 4.01 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1163.58 ns 5.55 ns 5.55 ns 1.00
from array of 1 - create + subscribe + current_thread 1432.57 ns 15.43 ns 15.45 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 3840.47 ns 184.71 ns 187.21 ns 0.99
defer from array of 1 - defer + create + subscribe + immediate 1207.99 ns 5.24 ns 5.24 ns 1.00
interval - interval + take(3) + subscribe + immediate 3130.45 ns 134.16 ns 134.27 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3836.57 ns 52.75 ns 52.96 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 123888.89 ns 114630.00 ns 112100.00 ns 1.02
from array of 1000 - create + as_blocking + subscribe + new_thread 138675.00 ns 136412.50 ns 133937.50 ns 1.02

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1863.90 ns 12.87 ns 12.87 ns 1.00
immediate_just+filter(true)+subscribe 1348.20 ns 12.39 ns 12.39 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 2072.05 ns 13.05 ns 13.00 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1378.67 ns 15.94 ns 15.95 ns 1.00
immediate_just(1,2)+first()+subscribe 2121.03 ns 12.65 ns 12.64 ns 1.00
immediate_just(1,2)+last()+subscribe 1790.94 ns 14.08 ns 14.11 ns 1.00
immediate_just+take_last(1)+subscribe 2047.09 ns 61.34 ns 61.27 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 487.92 ns 6.17 ns 6.17 ns 1.00
current_thread scheduler create worker + schedule 662.63 ns 13.39 ns 13.37 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1088.67 ns 104.71 ns 104.71 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1337.05 ns 12.33 ns 12.41 ns 0.99
immediate_just+scan(10, std::plus)+subscribe 1471.71 ns 21.27 ns 21.29 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 3606.69 ns 223.71 ns 241.25 ns 0.93
immediate_just+buffer(2)+subscribe 2358.39 ns 59.57 ns 60.89 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 4106.95 ns 1223.29 ns 1215.47 ns 1.01

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1324.41 ns 11.45 ns 11.47 ns 1.00
immediate_just+take_while(true)+subscribe 1332.82 ns 12.39 ns 12.39 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3273.43 ns 7.71 ns 7.71 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 6378.79 ns 230.79 ns 234.36 ns 0.98
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 5967.58 ns 229.99 ns 230.87 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 218.07 ns 218.59 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 5564.89 ns 959.51 ns 972.46 ns 0.99
immediate_just(1) + zip(immediate_just(2)) + subscribe 3658.97 ns 525.68 ns 528.98 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.47 ns 25.59 ns 25.59 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1965.54 ns 57.19 ns 57.30 ns 1.00
basic sample with immediate scheduler 1918.86 ns 35.79 ns 37.06 ns 0.97

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1478.37 ns 17.80 ns 17.81 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1984.66 ns 336.02 ns 334.20 ns 1.01

Copy link

@victimsnino victimsnino merged commit abc99a8 into victimsnino:v2 Apr 30, 2024
27 checks passed
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.

2 participants