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

Simplify subscription #256

Merged
merged 1 commit into from
Sep 6, 2022
Merged

Simplify subscription #256

merged 1 commit into from
Sep 6, 2022

Conversation

victimsnino
Copy link
Owner

No description provided.

@victimsnino victimsnino marked this pull request as ready for review September 6, 2022 09:41
@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #256 (2e62b6d) into main (3b89b03) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #256      +/-   ##
==========================================
- Coverage   98.43%   98.42%   -0.01%     
==========================================
  Files          92       92              
  Lines        1341     1337       -4     
==========================================
- Hits         1320     1316       -4     
  Misses         21       21              
Impacted Files Coverage Δ
...c/rpp/rpp/subscriptions/composite_subscription.hpp 92.42% <100.00%> (-0.44%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-clang

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.34ns 0.422987 0.79 0.34ns
Dynamic observable construction 29.22ns 38.2909 0.76 24.64ns
Specific observable construction + as_dynamic 29.13ns 32.7928 0.89 24.55ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 110.60ns 151.104 0.73 286.43ns
Specific observable lift dynamic observer 134.04ns 178.775 0.75 309.77ns
Dynamic observable lift specific observer 182.49ns 241.416 0.76 336.18ns
Dynamic observable lift dynamic observer 190.87ns 235.695 0.81 323.33ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 77.36ns 99.4397 0.78 284.67ns
Specific observable subscribe dynamic observer 90.61ns 115.305 0.79 298.93ns
Dynamic observable subscribe specific observer 145.89ns 138.715 1.05 326.40ns
Dynamic observable subscribe dynamic observer 139.72ns 172.251 0.81 318.11ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 75.64ns 108.988 0.69 285.45ns
Dynamic observable subscribe lambda 142.45ns 143.034 1.00 326.95ns
Specific observable subscribe lambda without subscription 75.71ns 110.082 0.69 286.67ns
Dynamic observable subscribe lambda without subscription 140.12ns 174.292 0.80 325.16ns
Specific observable subscribe specific subscriber 43.11ns 50.6649 0.85 222.58ns
Dynamic observable subscribe specific subscriber 107.96ns 127.947 0.84 264.63ns
Specific observable subscribe dynamic observer 43.46ns 41.5668 1.05 237.37ns
Dynamic observable subscribe dynamic observer 94.01ns 83.5994 1.12 258.91ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.34ns 0.324235 1.03 0.34ns
Dynamic observer construction 38.12ns 34.0943 1.12 22.01ns
Specific observer construction + as_dynamic 29.26ns 32.6562 0.90 22.29ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.804222 0.83 0.67ns
Dynamic observer OnNext 1.68ns 2.20521 0.76 2.34ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 32.48ns 53.298 0.61 64.77ns
Make copy of subscriber 16.74ns 17.7302 0.94 4.69ns
Transform subsriber to dynamic 43.67ns 42.0868 1.04 27.91ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 32.61ns 46.2739 0.70 52.44ns
composite_subscription add 48.95ns 53.6055 0.91 76.65ns
composite_subscription unsubscribe 44.07ns 45.187 0.98 23.18ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 273.33ns 274.591 1.00 2254.48ns
sending of values from observable via buffer to subscriber 6.46ns 7.19682 0.90 27.33ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 268.82ns 301.494 0.89 491.42ns
long stateful chain creation + subscribe 401.46ns 431.953 0.93 797.08ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 613.97ns 755.149 0.81 854.66ns
sending of values from observable via combine_latest to subscriber 18.09ns 20.054 0.90 2.34ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1397.99ns 1635.87 0.85 3261.28ns
concat_with 1651.41ns 1933.64 0.85 3664.43ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 127.44ns 140.871 0.90 248.06ns
sending of values from observable via distinct_until_changed to subscriber 2.35ns 2.51922 0.93 2.01ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 144.34ns 163.825 0.88 584.57ns
sending of values from observable via first to subscriber 0.67ns 0.724054 0.93 0.67ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 85.47ns 98.2191 0.87 628.25ns
error 134.49ns 145.929 0.92 743.29ns
never 47.17ns 49.354 0.96 250.74ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 98.92ns 91.2352 1.08 658.78ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 0.67ns 1.61244 0.42 111.03ns
re-schedule 10 times 9.39ns 11.9979 0.78 143.46ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 85.34ns 88.1411 0.97 635.78ns
just send variadic 116.85ns 110.112 1.06 749.52ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 89.06ns 96.9715 0.92 240.82ns
sending of values from observable via map to subscriber 1.01ns 1.11938 0.90 1.51ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1341.34ns 1505.19 0.89 3419.88ns
merge_with 1591.67ns 1884.03 0.84 3504.75ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 576.82ns 698.841 0.83 2608.56ns
sending of values from observable via observe_on to subscriber 89.76ns 108.295 0.83 203.49ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 24.06ns 24.3446 0.99 10.11ns
on_error 0.50ns 0.695285 0.73 19.17ns
on_completed 0.50ns 0.777393 0.65 0.67ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 197.86ns 227.056 0.87 175.94ns
get_observable 29.10ns 30.4807 0.95 48.90ns
get_subscriber 60.48ns 72.6538 0.83 15.63ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 3963.47ns 4579.95 0.87 3027.26ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 124.56ns 143.175 0.87 297.45ns
sending of values from observable via scan to subscriber 2.01ns 2.32048 0.87 2.01ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 129.37ns 140.632 0.92 469.03ns
sending of values from observable via skip to subscriber 1.68ns 2.34169 0.72 1.78ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 1855.71ns 2230.5 0.83 2862.07ns
sending of values from observable via switch_on_next to subscriber 517.34ns 617.727 0.84 646.78ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 186.60ns 219.459 0.85 487.22ns
sending of values from observable via take to subscriber 2.35ns 2.59645 0.90 3.36ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 225.94ns 242.153 0.93 525.05ns
sending of values from observable via take_last to subscriber 3.70ns 3.88246 0.95 4.11ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 11.74ns 9.75786 1.20 158.16ns
re-schedule 10 times 30.54ns 35.8569 0.85 192.72ns
recursively schedule 10 times 1410.17ns 1626.12 0.87 5435.13ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2024.31ns 1880.4 1.08 3117.38ns
sending of values from observable via window to subscriber 555.11ns 629.582 0.88 369.76ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 632.15ns 591.686 1.07 1132.50ns
sending of values from observable via with_latest_from to subscriber 17.73ns 21.2849 0.83 3.27ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.34ns 0.331753 1.01 0.33ns
Dynamic observable construction 31.53ns 32.4821 0.97 22.73ns
Specific observable construction + as_dynamic 31.52ns 28.5502 1.10 23.48ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 119.29ns 116.592 1.02 328.64ns
Specific observable lift dynamic observer 144.96ns 152.823 0.95 345.00ns
Dynamic observable lift specific observer 199.14ns 220.062 0.90 383.12ns
Dynamic observable lift dynamic observer 208.39ns 221.113 0.94 363.19ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 83.86ns 85.5749 0.98 323.32ns
Specific observable subscribe dynamic observer 95.91ns 103.855 0.92 330.66ns
Dynamic observable subscribe specific observer 149.81ns 145.515 1.03 360.97ns
Dynamic observable subscribe dynamic observer 146.18ns 178.844 0.82 338.14ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 83.05ns 99.5114 0.83 322.58ns
Dynamic observable subscribe lambda 151.12ns 186.362 0.81 360.86ns
Specific observable subscribe lambda without subscription 82.56ns 94.7224 0.87 323.00ns
Dynamic observable subscribe lambda without subscription 151.51ns 143.092 1.06 362.82ns
Specific observable subscribe specific subscriber 50.25ns 46.7386 1.08 269.32ns
Dynamic observable subscribe specific subscriber 118.18ns 134.738 0.88 312.03ns
Specific observable subscribe dynamic observer 49.99ns 46.9419 1.06 278.27ns
Dynamic observable subscribe dynamic observer 102.75ns 115.365 0.89 287.32ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.34ns 0.294852 1.14 0.33ns
Dynamic observer construction 31.56ns 31.0778 1.02 21.56ns
Specific observer construction + as_dynamic 31.79ns 26.8105 1.19 20.18ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.34ns 0.308855 1.09 0.34ns
Dynamic observer OnNext 2.01ns 1.83699 1.10 2.01ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 34.82ns 34.3453 1.01 58.16ns
Make copy of subscriber 16.75ns 18.3764 0.91 4.49ns
Transform subsriber to dynamic 44.50ns 42.3533 1.05 26.76ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 34.80ns 34.0787 1.02 54.71ns
composite_subscription add 46.98ns 45.8407 1.02 101.04ns
composite_subscription unsubscribe 42.12ns 56.3877 0.75 22.04ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 254.44ns 237.966 1.07 1888.84ns
sending of values from observable via buffer to subscriber 6.89ns 5.74395 1.20 31.13ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 302.14ns 305.158 0.99 705.49ns
long stateful chain creation + subscribe 436.88ns 417.084 1.05 1075.30ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 643.13ns 720.303 0.89 1100.52ns
sending of values from observable via combine_latest to subscriber 18.44ns 21.5962 0.85 2.35ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1434.16ns 2263.49 0.63 3666.61ns
concat_with 1713.97ns 1586.89 1.08 3865.18ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 137.42ns 142.446 0.96 354.19ns
sending of values from observable via distinct_until_changed to subscriber 3.35ns 5.10643 0.66 1.34ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 159.90ns 140.955 1.13 701.08ns
sending of values from observable via first to subscriber 0.67ns 0.621587 1.08 1.01ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 87.33ns 83.8834 1.04 737.57ns
error 134.47ns 127.001 1.06 834.73ns
never 49.43ns 48.8254 1.01 281.91ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 105.71ns 114.329 0.92 776.04ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.68ns 1.03381 1.62 141.18ns
re-schedule 10 times 22.84ns 19.8983 1.15 161.48ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 90.41ns 93.3187 0.97 774.29ns
just send variadic 135.98ns 132.701 1.02 829.31ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 100.71ns 94.9538 1.06 340.30ns
sending of values from observable via map to subscriber 0.84ns 0.851653 0.98 2.34ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1374.29ns 1839.66 0.75 3751.68ns
merge_with 1668.30ns 1809.33 0.92 4007.56ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 617.17ns 655.305 0.94 2815.70ns
sending of values from observable via observe_on to subscriber 88.46ns 70.6904 1.25 238.13ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 22.72ns 21.2621 1.07 9.98ns
on_error 0.68ns 0.900676 0.75 16.80ns
on_completed 0.67ns 0.628815 1.07 1.01ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 212.08ns 195.025 1.09 174.78ns
get_observable 29.47ns 26.6387 1.11 48.00ns
get_subscriber 57.45ns 48.1281 1.19 23.23ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4133.06ns 3664.03 1.13 3227.25ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 137.71ns 139.286 0.99 388.62ns
sending of values from observable via scan to subscriber 3.35ns 3.66637 0.91 2.35ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 142.97ns 140.799 1.02 573.03ns
sending of values from observable via skip to subscriber 3.02ns 2.99806 1.01 2.34ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 1978.70ns 1896.02 1.04 4300.93ns
sending of values from observable via switch_on_next to subscriber 545.59ns 542.144 1.01 1061.83ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 191.06ns 225.807 0.85 585.56ns
sending of values from observable via take to subscriber 4.32ns 4.55673 0.95 3.77ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 231.00ns 230.359 1.00 629.47ns
sending of values from observable via take_last to subscriber 3.41ns 2.96809 1.15 5.94ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 21.98ns 20.16 1.09 183.01ns
re-schedule 10 times 49.31ns 44.0255 1.12 220.82ns
recursively schedule 10 times 1447.40ns 1562.56 0.93 6391.49ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2142.32ns 1943.48 1.10 3353.75ns
sending of values from observable via window to subscriber 587.23ns 571.9 1.03 416.23ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 673.58ns 681.108 0.99 1412.02ns
sending of values from observable via with_latest_from to subscriber 18.09ns 18.6509 0.97 4.18ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 1.50ns 2.03329 0.74 0.67ns
Dynamic observable construction 81.56ns 99.4069 0.82 123.41ns
Specific observable construction + as_dynamic 82.49ns 104.047 0.79 124.15ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 173.25ns 214.514 0.81 1207.41ns
Specific observable lift dynamic observer 205.77ns 290.186 0.71 1244.67ns
Dynamic observable lift specific observer 306.50ns 378.687 0.81 1417.47ns
Dynamic observable lift dynamic observer 263.74ns 323.706 0.81 1297.35ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 138.63ns 189.037 0.73 1169.27ns
Specific observable subscribe dynamic observer 151.66ns 210.652 0.72 1203.00ns
Dynamic observable subscribe specific observer 257.64ns 348.75 0.74 1358.21ns
Dynamic observable subscribe dynamic observer 202.00ns 240.629 0.84 1240.86ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 139.03ns 195.733 0.71 1171.41ns
Dynamic observable subscribe lambda 256.98ns 346.13 0.74 1352.50ns
Specific observable subscribe lambda without subscription 139.08ns 179.726 0.77 1169.68ns
Dynamic observable subscribe lambda without subscription 257.05ns 358.277 0.72 1344.75ns
Specific observable subscribe specific subscriber 49.19ns 63.1024 0.78 837.36ns
Dynamic observable subscribe specific subscriber 169.06ns 206.048 0.82 1019.00ns
Specific observable subscribe dynamic observer 52.45ns 67.5308 0.78 874.28ns
Dynamic observable subscribe dynamic observer 101.69ns 125.176 0.81 906.59ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 1.74ns 2.04937 0.85 1.50ns
Dynamic observer construction 83.54ns 111.393 0.75 112.90ns
Specific observer construction + as_dynamic 83.52ns 108.029 0.77 113.12ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.836492 0.80 0.67ns
Dynamic observer OnNext 2.01ns 2.41165 0.83 1.71ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 85.14ns 122.574 0.69 347.16ns
Make copy of subscriber 16.72ns 17.3518 0.96 31.43ns
Transform subsriber to dynamic 97.33ns 122.333 0.80 150.34ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 85.38ns 115.288 0.74 341.97ns
composite_subscription add 73.71ns 95.1135 0.77 152.02ns
composite_subscription unsubscribe 64.79ns 85.0167 0.76 122.63ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 382.31ns 466.424 0.82 4530.67ns
sending of values from observable via buffer to subscriber 6.88ns 8.66984 0.79 91.84ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 284.88ns 351.333 0.81 1717.79ns
long stateful chain creation + subscribe 691.63ns 846.548 0.82 3167.50ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1082.57ns 1626.47 0.67 2998.50ns
sending of values from observable via combine_latest to subscriber 35.82ns 42.8787 0.84 4.53ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2078.33ns 2574.45 0.81 12175.30ns
concat_with 2686.20ns 3317.33 0.81 13162.30ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 202.30ns 263.829 0.77 1020.92ns
sending of values from observable via distinct_until_changed to subscriber 4.63ns 3.82919 1.21 4.22ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 146.27ns 192.225 0.76 2622.70ns
sending of values from observable via first to subscriber 2.34ns 3.28271 0.71 1.81ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 82.52ns 106.268 0.78 2380.27ns
error 139.24ns 173.318 0.80 2459.36ns
never 51.20ns 62.412 0.82 876.62ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 156.63ns 201.136 0.78 2454.50ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.75ns 1.58728 1.11 408.37ns
re-schedule 10 times 97.92ns 124.194 0.79 436.66ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 89.20ns 111.404 0.80 2394.91ns
just send variadic 124.78ns 163.682 0.76 2470.90ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 104.97ns 135.821 0.77 1068.69ns
sending of values from observable via map to subscriber 3.68ns 4.61717 0.80 6.49ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1966.69ns 2584.75 0.76 20391.00ns
merge_with 2575.80ns 3244.56 0.79 21021.70ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 952.79ns 1075.89 0.89 6592.80ns
sending of values from observable via observe_on to subscriber 84.69ns 118.278 0.72 849.54ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 19.91ns 26.3571 0.76 32.70ns
on_error 3.38ns 5.27168 0.64 18.37ns
on_completed 3.04ns 2.73674 1.11 1.36ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 357.09ns 444.5 0.80 745.54ns
get_observable 28.88ns 30.4447 0.95 165.36ns
get_subscriber 50.16ns 64.6608 0.78 89.10ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 6102.00ns 8390.5 0.73 14183.00ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 207.91ns 280.912 0.74 1248.38ns
sending of values from observable via scan to subscriber 5.38ns 6.82006 0.79 10.22ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 191.49ns 233.596 0.82 1854.00ns
sending of values from observable via skip to subscriber 4.54ns 6.00172 0.76 3.97ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2929.00ns 3379.5 0.87 11933.00ns
sending of values from observable via switch_on_next to subscriber 792.21ns 1018.86 0.78 3098.33ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 248.61ns 305.686 0.81 2495.33ns
sending of values from observable via take to subscriber 5.56ns 6.06165 0.92 5.59ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 347.91ns 437.516 0.80 2457.45ns
sending of values from observable via take_last to subscriber 4.41ns 4.88052 0.90 20.48ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 18.88ns 21.4697 0.88 610.71ns
re-schedule 10 times 120.91ns 148.538 0.81 654.97ns
recursively schedule 10 times 2683.40ns 3133.0 0.86 18655.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 3411.89ns 3853.62 0.89 9660.00ns
sending of values from observable via window to subscriber 840.81ns 1035.89 0.81 1626.81ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1094.82ns 1316.8 0.83 3793.00ns
sending of values from observable via with_latest_from to subscriber 29.49ns 34.857 0.85 7.26ns

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@victimsnino victimsnino merged commit 6f40411 into main Sep 6, 2022
@victimsnino victimsnino deleted the simplify_subscription branch September 6, 2022 09:56
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