Skip to content

Commit

Permalink
fix dynamic (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino authored Mar 26, 2024
1 parent 7c0e49d commit cf14a07
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/rpp/rpp/observables/dynamic_observable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ namespace rpp::details::observables
{
}

dynamic_strategy(const dynamic_strategy&) = default;
dynamic_strategy(dynamic_strategy&&) noexcept = default;

template<rpp::constraint::observer_strategy<Type> ObserverStrategy>
void subscribe(observer<Type, ObserverStrategy>&& observer) const
{
Expand Down
3 changes: 0 additions & 3 deletions src/rpp/rpp/observables/observable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ namespace rpp
{
}

observable(const observable&) = default;
observable(observable&&) noexcept = default;

/**
* @brief Subscribes passed observer to emissions from this observable.
*
Expand Down
3 changes: 0 additions & 3 deletions src/rpp/rpp/observers/dynamic_observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ namespace rpp::details::observers
{
}

dynamic_strategy(const dynamic_strategy&) = default;
dynamic_strategy(dynamic_strategy&&) noexcept = default;

void set_upstream(const disposable_wrapper& d) noexcept { m_vtable->set_upstream(m_forwarder.get(), d); }

bool is_disposed() const noexcept { return m_vtable->is_disposed(m_forwarder.get()); }
Expand Down
6 changes: 0 additions & 6 deletions src/rpp/rpp/observers/observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ namespace rpp::details
{
}

observer_impl(const observer_impl&) = default;
observer_impl(observer_impl&&) noexcept = default;

public:
using preferred_disposable_strategy = observers::none_disposable_strategy;

Expand Down Expand Up @@ -248,9 +245,6 @@ namespace rpp
{
}

observer(const observer&) = default;
observer(observer&&) noexcept = default;

dynamic_observer<Type> as_dynamic() &&
{
return dynamic_observer<Type>{std::move(*this)};
Expand Down

1 comment on commit cf14a07

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 316.94 ns 2.16 ns 2.16 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 308.83 ns 2.16 ns 2.16 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 698.54 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1045.00 ns 5.25 ns 5.25 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2269.46 ns 114.24 ns 111.26 ns 1.03
defer from array of 1 - defer + create + subscribe + immediate 740.76 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2194.74 ns 59.23 ns 59.19 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3058.21 ns 32.73 ns 32.73 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1084.88 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 883.86 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 991.71 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 882.20 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1248.61 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 929.36 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1102.65 ns 18.52 ns 18.52 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 260.31 ns 2.16 ns 2.16 ns 1.00
current_thread scheduler create worker + schedule 367.25 ns 7.15 ns 7.10 ns 1.01
current_thread scheduler create worker + schedule + recursive schedule 824.97 ns 64.58 ns 64.30 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 856.04 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 921.34 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2356.59 ns 169.14 ns 167.92 ns 1.01
immediate_just+buffer(2)+subscribe 1556.70 ns 14.20 ns 14.51 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2311.72 ns 1037.45 ns 1032.13 ns 1.01

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1995.83 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 3497.15 ns 175.99 ns 218.25 ns 0.81
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3697.79 ns 165.10 ns 182.77 ns 0.90
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 141.57 ns 153.04 ns 0.93
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3604.25 ns 1126.43 ns 1135.29 ns 0.99
immediate_just(1) + zip(immediate_just(2)) + subscribe 2125.16 ns 214.10 ns 227.65 ns 0.94

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.46 ns 12.02 ns 12.03 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1464.40 ns 14.55 ns 14.51 ns 1.00
basic sample with immediate scheduler 1381.38 ns 5.55 ns 5.55 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 905.80 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 1035.73 ns 122.03 ns 124.45 ns 0.98

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 974.31 ns 3.85 ns 5.63 ns 0.68
Subscribe empty callbacks to empty observable via pipe operator 975.22 ns 3.87 ns 5.59 ns 0.69

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1926.14 ns 0.23 ns 0.44 ns 0.52
from array of 1 - create + subscribe + current_thread 2444.24 ns 25.38 ns 9.97 ns 2.54
concat_as_source of just(1 immediate) create + subscribe 5478.95 ns 328.44 ns 452.58 ns 0.73
defer from array of 1 - defer + create + subscribe + immediate 1968.50 ns 0.23 ns 0.29 ns 0.80
interval - interval + take(3) + subscribe + immediate 4932.70 ns 114.40 ns 108.29 ns 1.06
interval - interval + take(3) + subscribe + current_thread 6008.84 ns 107.70 ns 62.71 ns 1.72

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2835.39 ns 0.23 ns 0.28 ns 0.83
immediate_just+filter(true)+subscribe 2098.90 ns 0.23 ns 0.31 ns 0.75
immediate_just(1,2)+skip(1)+subscribe 2741.65 ns 0.23 ns 0.33 ns 0.70
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2088.89 ns 0.47 ns 0.69 ns 0.68
immediate_just(1,2)+first()+subscribe 3162.21 ns 0.23 ns 0.32 ns 0.73
immediate_just(1,2)+last()+subscribe 2375.77 ns 0.23 ns 0.30 ns 0.77
immediate_just+take_last(1)+subscribe 2990.77 ns 71.45 ns 77.77 ns 0.92

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 837.43 ns 3.93 ns 7.34 ns 0.54
current_thread scheduler create worker + schedule 1169.16 ns 39.53 ns 17.73 ns 2.23
current_thread scheduler create worker + schedule + recursive schedule 1969.58 ns 215.83 ns 209.92 ns 1.03

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2105.10 ns 0.23 ns 0.30 ns 0.78
immediate_just+scan(10, std::plus)+subscribe 2337.40 ns 0.47 ns 0.59 ns 0.79
immediate_just+flat_map(immediate_just(v*2))+subscribe 5370.99 ns 419.63 ns 491.62 ns 0.85
immediate_just+buffer(2)+subscribe 2469.87 ns 69.89 ns 69.39 ns 1.01
immediate_just+window(2)+subscribe + subscsribe inner 5328.91 ns 2275.36 ns 2947.25 ns 0.77

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2093.34 ns - - 0.00
immediate_just+take_while(true)+subscribe 2107.35 ns 0.23 ns 0.29 ns 0.80

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 4910.08 ns 0.23 ns 0.33 ns 0.70

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 7411.93 ns 446.27 ns 578.20 ns 0.77
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 8573.61 ns 446.31 ns 628.49 ns 0.71
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 474.71 ns 536.78 ns 0.88
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 8209.52 ns 1898.15 ns 2550.02 ns 0.74
immediate_just(1) + zip(immediate_just(2)) + subscribe 5237.56 ns 889.58 ns 1044.17 ns 0.85

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 77.07 ns 47.28 ns 65.33 ns 0.72

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2752.29 ns 116.81 ns 59.39 ns 1.97
basic sample with immediate scheduler 2695.74 ns 14.07 ns 5.87 ns 2.40

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2362.81 ns 0.23 ns 0.42 ns 0.55

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 6494.53 ns 4084.45 ns 6791.64 ns 0.60

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 277.92 ns 0.88 ns 1.57 ns 0.56
Subscribe empty callbacks to empty observable via pipe operator 281.13 ns 0.88 ns 1.57 ns 0.56

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 567.51 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 796.80 ns 5.56 ns 5.56 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 1863.78 ns 113.10 ns 112.64 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 593.33 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 1521.42 ns 58.31 ns 58.30 ns 1.00
interval - interval + take(3) + subscribe + current_thread 2077.78 ns 31.55 ns 31.50 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 908.23 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 662.96 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 868.74 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 692.90 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1089.52 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 738.46 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 973.01 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 201.87 ns 0.88 ns 1.55 ns 0.56
current_thread scheduler create worker + schedule 313.13 ns 5.58 ns 5.57 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 626.92 ns 60.81 ns 58.99 ns 1.03

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 655.85 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 743.04 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 1814.29 ns 119.41 ns 119.28 ns 1.00
immediate_just+buffer(2)+subscribe 1367.71 ns 14.51 ns 14.20 ns 1.02
immediate_just+window(2)+subscribe + subscsribe inner 2152.00 ns 811.35 ns 801.64 ns 1.01

Conditional Operators

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

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1595.22 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 2542.65 ns 126.13 ns 124.88 ns 1.01
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3037.13 ns 121.43 ns 121.09 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 109.94 ns 110.55 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 2589.37 ns 727.96 ns 727.90 ns 1.00
immediate_just(1) + zip(immediate_just(2)) + subscribe 1753.52 ns 167.87 ns 166.40 ns 1.01

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 27.14 ns 13.88 ns 14.50 ns 0.96

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1041.53 ns 13.28 ns 13.28 ns 1.00
basic sample with immediate scheduler 1015.43 ns 6.17 ns 6.17 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 738.67 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 866.93 ns 126.27 ns 126.70 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 873.45 ns 4.39 ns 4.95 ns 0.89
Subscribe empty callbacks to empty observable via pipe operator 802.42 ns 4.02 ns 4.95 ns 0.81

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1432.83 ns 5.55 ns 5.68 ns 0.98
from array of 1 - create + subscribe + current_thread 2476.90 ns 19.14 ns 18.51 ns 1.03
concat_as_source of just(1 immediate) create + subscribe 4459.62 ns 190.21 ns 169.21 ns 1.12
defer from array of 1 - defer + create + subscribe + immediate 1219.57 ns 5.86 ns 5.55 ns 1.05
interval - interval + take(3) + subscribe + immediate 3116.67 ns 134.17 ns 133.73 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3776.32 ns 65.53 ns 58.73 ns 1.12

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1861.75 ns 12.86 ns 12.87 ns 1.00
immediate_just+filter(true)+subscribe 1333.85 ns 12.35 ns 11.70 ns 1.06
immediate_just(1,2)+skip(1)+subscribe 1757.06 ns 13.12 ns 13.12 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1396.65 ns 15.94 ns 15.79 ns 1.01
immediate_just(1,2)+first()+subscribe 2076.09 ns 12.64 ns 12.95 ns 0.98
immediate_just(1,2)+last()+subscribe 1464.80 ns 14.04 ns 14.12 ns 0.99
immediate_just+take_last(1)+subscribe 2059.77 ns 59.40 ns 60.40 ns 0.98

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 497.56 ns 6.17 ns 6.18 ns 1.00
current_thread scheduler create worker + schedule 736.82 ns 24.83 ns 18.22 ns 1.36
current_thread scheduler create worker + schedule + recursive schedule 1099.23 ns 129.67 ns 115.91 ns 1.12

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1322.91 ns 12.36 ns 11.21 ns 1.10
immediate_just+scan(10, std::plus)+subscribe 1446.10 ns 21.27 ns 21.58 ns 0.99
immediate_just+flat_map(immediate_just(v*2))+subscribe 3555.65 ns 229.32 ns 234.53 ns 0.98
immediate_just+buffer(2)+subscribe 2319.05 ns 59.42 ns 59.93 ns 0.99
immediate_just+window(2)+subscribe + subscsribe inner 4078.80 ns 1534.45 ns 1563.98 ns 0.98

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2616.37 ns 11.95 ns 11.44 ns 1.04
immediate_just+take_while(true)+subscribe 2603.88 ns 15.12 ns 11.71 ns 1.29

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3801.30 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 5984.09 ns 254.20 ns 263.67 ns 0.96
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 9701.49 ns 235.58 ns 245.35 ns 0.96
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 441.76 ns 238.58 ns 1.85
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 8689.26 ns 1479.16 ns 958.62 ns 1.54
immediate_just(1) + zip(immediate_just(2)) + subscribe 5092.14 ns 821.52 ns 534.91 ns 1.54

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.10 ns 26.51 ns 26.82 ns 0.99

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1876.24 ns 59.35 ns 59.30 ns 1.00
basic sample with immediate scheduler 1876.91 ns 35.48 ns 35.50 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1490.12 ns 17.82 ns 19.97 ns 0.89

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1962.71 ns 333.40 ns 333.08 ns 1.00

Please sign in to comment.