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

minor concepts fixes #492

Merged
merged 1 commit into from
Dec 17, 2023
Merged

minor concepts fixes #492

merged 1 commit into from
Dec 17, 2023

Conversation

victimsnino
Copy link
Owner

No description provided.

@victimsnino victimsnino marked this pull request as ready for review December 17, 2023 14:23
Copy link
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 280.91 ns 1.42 ns 1.24 ns 1.15
Subscribe empty callbacks to empty observable via pipe operator 281.68 ns 1.42 ns 1.24 ns 1.15

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 640.44 ns 0.58 ns 0.62 ns 0.93
from array of 1 - create + subscribe + current_thread 972.38 ns 4.27 ns 4.63 ns 0.92
concat_as_source of just(1 immediate) create + subscribe 2108.02 ns 74.56 ns 80.26 ns 0.93
defer from array of 1 - defer + create + subscribe + immediate 717.65 ns 0.28 ns 0.31 ns 0.92
interval - interval + take(3) + subscribe + immediate 1962.27 ns 53.83 ns 58.04 ns 0.93
interval - interval + take(3) + subscribe + current_thread 2805.32 ns 29.61 ns 32.12 ns 0.92

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1070.28 ns 0.30 ns 0.31 ns 0.96
immediate_just+filter(true)+subscribe 776.87 ns 0.29 ns 0.31 ns 0.93
immediate_just(1,2)+skip(1)+subscribe 906.52 ns 0.28 ns 0.31 ns 0.92
immediate_just(1,1,2)+distinct_until_changed()+subscribe 787.29 ns 0.28 ns 0.31 ns 0.92
immediate_just(1,2)+first()+subscribe 1145.85 ns 0.57 ns 0.62 ns 0.92
immediate_just(1,2)+last()+subscribe 845.43 ns 0.28 ns 0.31 ns 0.92
immediate_just+take_last(1)+subscribe 1062.66 ns 20.09 ns 17.91 ns 1.12

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 265.24 ns 1.42 ns 1.24 ns 1.15
current_thread scheduler create worker + schedule 357.19 ns 5.12 ns 5.56 ns 0.92
current_thread scheduler create worker + schedule + recursive schedule 754.28 ns 57.93 ns 62.80 ns 0.92

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 781.10 ns 0.28 ns 0.31 ns 0.92
immediate_just+scan(10, std::plus)+subscribe 855.22 ns 0.28 ns 0.31 ns 0.92
immediate_just+flat_map(immediate_just(v*2))+subscribe 2201.17 ns 88.60 ns 96.23 ns 0.92
immediate_just+buffer(2)+subscribe 1432.75 ns 13.38 ns 13.59 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2372.14 ns 680.89 ns 697.20 ns 0.98

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 755.29 ns - - 0.00
immediate_just+take_while(true)+subscribe 763.08 ns 0.28 ns 0.31 ns 0.92

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1830.67 ns 0.28 ns 0.31 ns 0.92

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3125.16 ns 110.70 ns 112.40 ns 0.98
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3454.86 ns 100.51 ns 107.16 ns 0.94
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 80.63 ns 86.48 ns 0.93
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3271.45 ns 439.93 ns 477.00 ns 0.92

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 31.82 ns 21.47 ns 23.30 ns 0.92

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1348.10 ns 13.67 ns 14.82 ns 0.92
basic sample with immediate scheduler 1273.85 ns 5.12 ns 5.55 ns 0.92

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 844.41 ns 0.28 ns 0.31 ns 0.92

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1284.83 ns 3.96 ns 3.28 ns 1.21
Subscribe empty callbacks to empty observable via pipe operator 1283.85 ns 3.97 ns 3.08 ns 1.29

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 2541.09 ns 0.31 ns 0.23 ns 1.31
from array of 1 - create + subscribe + current_thread 3222.46 ns 33.67 ns 25.80 ns 1.30
concat_as_source of just(1 immediate) create + subscribe 7230.72 ns 331.86 ns 253.25 ns 1.31
defer from array of 1 - defer + create + subscribe + immediate 2626.21 ns 0.31 ns 0.24 ns 1.27
interval - interval + take(3) + subscribe + immediate 6534.11 ns 150.28 ns 114.94 ns 1.31
interval - interval + take(3) + subscribe + current_thread 7965.13 ns 143.70 ns 109.73 ns 1.31

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 3761.00 ns 0.30 ns 0.23 ns 1.30
immediate_just+filter(true)+subscribe 2778.95 ns 0.30 ns 0.23 ns 1.31
immediate_just(1,2)+skip(1)+subscribe 3601.78 ns 0.31 ns 0.23 ns 1.32
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2711.21 ns 0.62 ns 0.47 ns 1.32
immediate_just(1,2)+first()+subscribe 4202.10 ns 0.31 ns 0.23 ns 1.31
immediate_just(1,2)+last()+subscribe 3171.72 ns 0.31 ns 0.23 ns 1.32
immediate_just+take_last(1)+subscribe 4012.09 ns 92.41 ns 70.66 ns 1.31

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 1125.81 ns 3.50 ns 2.65 ns 1.32
current_thread scheduler create worker + schedule 1947.15 ns 58.23 ns 36.27 ns 1.61
current_thread scheduler create worker + schedule + recursive schedule 2889.49 ns 323.73 ns 219.17 ns 1.48

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2791.80 ns 0.31 ns 0.23 ns 1.32
immediate_just+scan(10, std::plus)+subscribe 3078.71 ns 0.61 ns 0.47 ns 1.31
immediate_just+flat_map(immediate_just(v*2))+subscribe 6955.08 ns 445.35 ns 333.03 ns 1.34
immediate_just+buffer(2)+subscribe 3293.43 ns 88.49 ns 68.95 ns 1.28
immediate_just+window(2)+subscribe + subscsribe inner 7061.07 ns 2476.65 ns 1898.23 ns 1.30

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2787.87 ns - - 0.00
immediate_just+take_while(true)+subscribe 2796.09 ns 0.31 ns 0.25 ns 1.24

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 6447.14 ns 0.31 ns 0.23 ns 1.31

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 11146.62 ns 607.44 ns 367.99 ns 1.65
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 11122.05 ns 553.76 ns 379.02 ns 1.46
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 535.41 ns 396.59 ns 1.35
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 10527.32 ns 2147.84 ns 1399.04 ns 1.54

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 94.07 ns 91.29 ns 70.73 ns 1.29

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 3561.86 ns 138.54 ns 109.16 ns 1.27
basic sample with immediate scheduler 3573.66 ns 19.01 ns 15.30 ns 1.24

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 3046.38 ns 0.30 ns 0.23 ns 1.28

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 269.61 ns 0.88 ns 0.88 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 269.76 ns 0.88 ns 0.88 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 565.69 ns 0.31 ns 0.33 ns 0.95
from array of 1 - create + subscribe + current_thread 786.00 ns 5.55 ns 5.55 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 1872.57 ns 71.73 ns 71.65 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 575.07 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 1525.67 ns 57.07 ns 57.09 ns 1.00
interval - interval + take(3) + subscribe + current_thread 2146.26 ns 30.91 ns 30.86 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 927.03 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 647.24 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 838.02 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 683.56 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1051.51 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 758.76 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 952.07 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 195.21 ns 0.88 ns 0.88 ns 1.01
current_thread scheduler create worker + schedule 302.21 ns 5.61 ns 5.56 ns 1.01
current_thread scheduler create worker + schedule + recursive schedule 617.96 ns 57.87 ns 58.15 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 648.71 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 694.00 ns 0.31 ns 0.32 ns 0.97
immediate_just+flat_map(immediate_just(v*2))+subscribe 1796.13 ns 78.29 ns 79.73 ns 0.98
immediate_just+buffer(2)+subscribe 1363.75 ns 13.59 ns 14.19 ns 0.96
immediate_just+window(2)+subscribe + subscsribe inner 2134.63 ns 588.32 ns 598.97 ns 0.98

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1588.09 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 2587.96 ns 84.76 ns 87.28 ns 0.97
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3007.54 ns 93.46 ns 95.84 ns 0.98
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 78.95 ns 82.37 ns 0.96
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 2596.91 ns 545.87 ns 549.59 ns 0.99

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 26.27 ns 24.37 ns 24.36 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1062.32 ns 13.59 ns 13.57 ns 1.00
basic sample with immediate scheduler 1044.32 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

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

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 569.11 ns 3.09 ns 2.47 ns 1.25
Subscribe empty callbacks to empty observable via pipe operator 612.77 ns 3.09 ns 2.47 ns 1.25

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1188.41 ns 4.94 ns 4.93 ns 1.00
from array of 1 - create + subscribe + current_thread 1450.59 ns 20.42 ns 19.77 ns 1.03
concat_as_source of just(1 immediate) create + subscribe 4724.38 ns 155.57 ns 158.91 ns 0.98
defer from array of 1 - defer + create + subscribe + immediate 1209.66 ns 4.94 ns 4.93 ns 1.00
interval - interval + take(3) + subscribe + immediate 3092.00 ns 130.83 ns 129.52 ns 1.01
interval - interval + take(3) + subscribe + current_thread 3497.62 ns 60.49 ns 59.86 ns 1.01

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1879.64 ns 12.88 ns 12.82 ns 1.00
immediate_just+filter(true)+subscribe 1389.95 ns 12.32 ns 12.32 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 2069.54 ns 13.08 ns 13.08 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1367.26 ns 15.94 ns 15.88 ns 1.00
immediate_just(1,2)+first()+subscribe 2432.88 ns 12.98 ns 12.64 ns 1.03
immediate_just(1,2)+last()+subscribe 1514.33 ns 14.13 ns 14.11 ns 1.00
immediate_just+take_last(1)+subscribe 2068.98 ns 59.89 ns 58.58 ns 1.02

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 486.83 ns 4.94 ns 4.94 ns 1.00
current_thread scheduler create worker + schedule 667.86 ns 16.98 ns 16.04 ns 1.06
current_thread scheduler create worker + schedule + recursive schedule 1109.38 ns 104.97 ns 106.24 ns 0.99

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1384.30 ns 12.33 ns 12.34 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1485.20 ns 21.28 ns 21.58 ns 0.99
immediate_just+flat_map(immediate_just(v*2))+subscribe 3603.44 ns 201.97 ns 203.48 ns 0.99
immediate_just+buffer(2)+subscribe 2687.96 ns 62.12 ns 61.67 ns 1.01
immediate_just+window(2)+subscribe + subscsribe inner 4154.66 ns 1101.76 ns 1079.13 ns 1.02

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1628.59 ns 11.46 ns 11.46 ns 1.00
immediate_just+take_while(true)+subscribe 1386.48 ns 12.33 ns 12.32 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3189.17 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 5405.43 ns 240.17 ns 237.53 ns 1.01
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 6616.00 ns 213.58 ns 211.66 ns 1.01
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 221.03 ns 219.13 ns 1.01
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 6235.12 ns 738.10 ns 736.90 ns 1.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.24 ns 36.16 ns 36.10 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1908.45 ns 59.91 ns 60.14 ns 1.00
basic sample with immediate scheduler 1896.63 ns 35.17 ns 35.17 ns 1.00

Aggregating Operators

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

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (13c4f42) 95.54% compared to head (8a170c2) 95.54%.

Files Patch % Lines
...pp/rpp/observables/details/disposable_strategy.hpp 0.00% 2 Missing ⚠️
src/rpp/rpp/observers/details/fwd.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##               v2     #492   +/-   ##
=======================================
  Coverage   95.54%   95.54%           
=======================================
  Files          76       76           
  Lines        1906     1906           
=======================================
  Hits         1821     1821           
  Misses         85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@victimsnino victimsnino merged commit 926b537 into v2 Dec 17, 2023
27 of 28 checks passed
@victimsnino victimsnino deleted the minor_concepts_fixes branch December 17, 2023 14:37
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.

1 participant