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

Fix memory leaks #245

Merged
merged 3 commits into from
Aug 30, 2022
Merged

Fix memory leaks #245

merged 3 commits into from
Aug 30, 2022

Conversation

victimsnino
Copy link
Owner

No description provided.

@sonarqubecloud
Copy link

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #245 (2b297cc) into main (650055d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #245   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files         128      128           
  Lines        5123     5130    +7     
=======================================
+ Hits         5050     5057    +7     
  Misses         73       73           
Impacted Files Coverage Δ
src/rpp/rpp/observables/connectable_observable.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/operators/ref_count.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/subjects/details/subject_state.hpp 100.00% <100.00%> (ø)
src/rpp/rpp/subjects/publish_subject.hpp 100.00% <100.00%> (ø)

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

@github-actions
Copy link
Contributor

ci-ubuntu-clang

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.40ns 0.334996 1.20 0.40ns
Dynamic observable construction 28.65ns 29.1117 0.98 26.29ns
Specific observable construction + as_dynamic 28.79ns 31.5196 0.91 26.27ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 126.74ns 129.18 0.98 294.76ns
Specific observable lift dynamic observer 154.43ns 149.67 1.03 306.33ns
Dynamic observable lift specific observer 206.67ns 204.684 1.01 333.68ns
Dynamic observable lift dynamic observer 219.75ns 205.757 1.07 328.74ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 90.38ns 94.1027 0.96 292.59ns
Specific observable subscribe dynamic observer 103.28ns 102.912 1.00 295.09ns
Dynamic observable subscribe specific observer 157.76ns 164.211 0.96 332.76ns
Dynamic observable subscribe dynamic observer 163.45ns 154.785 1.06 317.64ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 88.91ns 93.0297 0.96 289.20ns
Dynamic observable subscribe lambda 156.48ns 158.622 0.99 333.05ns
Specific observable subscribe lambda without subscription 89.58ns 92.9459 0.96 289.80ns
Dynamic observable subscribe lambda without subscription 157.32ns 157.356 1.00 326.00ns
Specific observable subscribe specific subscriber 40.98ns 43.4965 0.94 225.09ns
Dynamic observable subscribe specific subscriber 106.47ns 107.657 0.99 267.96ns
Specific observable subscribe dynamic observer 43.40ns 43.8735 0.99 236.34ns
Dynamic observable subscribe dynamic observer 96.73ns 94.5917 1.02 257.46ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.41ns 0.334587 1.23 0.40ns
Dynamic observer construction 28.60ns 29.1496 0.98 19.82ns
Specific observer construction + as_dynamic 28.84ns 29.2268 0.99 19.70ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.44ns 0.669785 0.66 0.44ns
Dynamic observer OnNext 1.61ns 1.67461 0.96 2.01ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 49.05ns 46.9617 1.04 68.30ns
Make copy of subscriber 16.09ns 16.7362 0.96 5.01ns
Transform subsriber to dynamic 47.50ns 45.8554 1.04 26.02ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 38.85ns 41.739 0.93 51.84ns
composite_subscription add 51.44ns 49.4738 1.04 21.46ns
composite_subscription unsubscribe 15.05ns 12.5494 1.20 13.66ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 263.37ns 268.47 0.98 2033.04ns
sending of values from observable via buffer to subscriber 7.12ns 6.40754 1.11 22.85ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 298.83ns 272.383 1.10 514.41ns
long stateful chain creation + subscribe 424.93ns 396.422 1.07 854.17ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 675.14ns 632.925 1.07 896.55ns
sending of values from observable via combine_latest to subscriber 22.53ns 18.0857 1.25 1.75ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1485.11ns 1418.03 1.05 3665.20ns
concat_with 1779.72ns 1682.21 1.06 4127.21ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 130.00ns 127.656 1.02 247.23ns
sending of values from observable via distinct_until_changed to subscriber 2.42ns 2.675 0.90 2.33ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 153.01ns 141.745 1.08 632.40ns
sending of values from observable via first to subscriber 0.73ns 0.670742 1.09 0.81ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 85.31ns 85.2545 1.00 655.27ns
error 143.00ns 135.241 1.06 755.15ns
never 44.91ns 47.0977 0.95 247.52ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 97.66ns 99.4454 0.98 698.80ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 27.33ns 27.4054 1.00 112.20ns
re-schedule 10 times 36.36ns 33.104 1.10 143.36ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 86.23ns 86.7676 0.99 679.03ns
just send variadic 109.00ns 116.787 0.93 772.17ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 96.27ns 89.3639 1.08 238.85ns
sending of values from observable via map to subscriber 1.21ns 1.00459 1.20 1.63ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1422.87ns 1371.67 1.04 3638.85ns
merge_with 1724.36ns 1627.41 1.06 3965.71ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 607.84ns 593.538 1.02 2550.65ns
sending of values from observable via observe_on to subscriber 92.08ns 90.8962 1.01 204.77ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 29.55ns 24.0578 1.23 8.10ns
on_error 0.61ns 0.505049 1.20 19.04ns
on_completed 0.61ns 0.504544 1.20 0.61ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 200.87ns 165.651 1.21 160.69ns
get_observable 33.76ns 29.1175 1.16 43.88ns
get_subscriber 66.73ns 57.9318 1.15 12.24ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4242.45ns 4024.97 1.05 3166.22ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 128.09ns 125.467 1.02 293.76ns
sending of values from observable via scan to subscriber 2.01ns 2.00844 1.00 1.99ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 125.16ns 118.74 1.05 475.39ns
sending of values from observable via skip to subscriber 2.41ns 2.34233 1.03 2.58ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 1956.35ns 1898.05 1.03 3201.14ns
sending of values from observable via switch_on_next to subscriber 553.10ns 531.745 1.04 723.50ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 194.88ns 187.237 1.04 511.80ns
sending of values from observable via take to subscriber 2.50ns 2.34655 1.07 2.19ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 38.26ns 37.5165 1.02 148.92ns
re-schedule 10 times 54.51ns 55.7766 0.98 179.10ns
recursively schedule 10 times 1452.16ns 1443.65 1.01 5354.86ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2230.37ns 1990.05 1.12 3351.57ns
sending of values from observable via window to subscriber 599.43ns 538.102 1.11 378.17ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 668.58ns 648.086 1.03 1083.53ns
sending of values from observable via with_latest_from to subscriber 22.52ns 17.7389 1.27 2.46ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.34ns 0.289087 1.16 0.34ns
Dynamic observable construction 31.49ns 43.0878 0.73 23.25ns
Specific observable construction + as_dynamic 31.51ns 26.0189 1.21 23.32ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 125.84ns 86.2425 1.46 335.63ns
Specific observable lift dynamic observer 152.66ns 107.488 1.42 349.48ns
Dynamic observable lift specific observer 204.05ns 154.703 1.32 388.90ns
Dynamic observable lift dynamic observer 214.42ns 158.587 1.35 370.19ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 94.41ns 60.4708 1.56 328.75ns
Specific observable subscribe dynamic observer 101.20ns 71.0947 1.42 331.67ns
Dynamic observable subscribe specific observer 154.20ns 109.184 1.41 370.11ns
Dynamic observable subscribe dynamic observer 152.84ns 111.139 1.38 348.32ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 89.03ns 60.4189 1.47 329.93ns
Dynamic observable subscribe lambda 155.07ns 109.664 1.41 374.75ns
Specific observable subscribe lambda without subscription 88.97ns 59.973 1.48 329.25ns
Dynamic observable subscribe lambda without subscription 155.66ns 109.389 1.42 387.42ns
Specific observable subscribe specific subscriber 50.24ns 35.3648 1.42 272.36ns
Dynamic observable subscribe specific subscriber 116.48ns 85.1347 1.37 314.75ns
Specific observable subscribe dynamic observer 50.03ns 35.0936 1.43 282.07ns
Dynamic observable subscribe dynamic observer 102.46ns 74.6478 1.37 291.07ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.34ns 0.287203 1.17 0.34ns
Dynamic observer construction 31.44ns 20.6508 1.52 20.78ns
Specific observer construction + as_dynamic 31.73ns 20.9238 1.52 20.90ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.33ns 0.322755 1.04 0.34ns
Dynamic observer OnNext 1.68ns 1.44154 1.17 1.74ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 40.29ns 25.2209 1.60 61.72ns
Make copy of subscriber 16.75ns 11.4842 1.46 4.48ns
Transform subsriber to dynamic 44.43ns 34.2784 1.30 26.34ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 36.84ns 24.6711 1.49 57.14ns
composite_subscription add 46.77ns 35.2772 1.33 17.36ns
composite_subscription unsubscribe 13.40ns 11.0069 1.22 11.18ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 254.10ns 182.506 1.39 1980.46ns
sending of values from observable via buffer to subscriber 6.42ns 4.37348 1.47 30.77ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 299.32ns 235.592 1.27 704.11ns
long stateful chain creation + subscribe 435.90ns 327.944 1.33 1058.02ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 653.12ns 483.635 1.35 1157.17ns
sending of values from observable via combine_latest to subscriber 18.47ns 16.0679 1.15 2.35ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1444.83ns 1078.82 1.34 3791.05ns
concat_with 1728.58ns 1294.31 1.34 4023.81ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 138.06ns 101.242 1.36 357.93ns
sending of values from observable via distinct_until_changed to subscriber 3.36ns 2.57884 1.30 2.34ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 161.20ns 118.689 1.36 707.27ns
sending of values from observable via first to subscriber 0.67ns 1.14749 0.58 1.01ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 87.63ns 61.8476 1.42 764.86ns
error 131.59ns 96.394 1.37 842.18ns
never 50.03ns 33.6778 1.49 282.03ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 105.70ns 72.5986 1.46 788.27ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 29.50ns 19.369 1.52 136.79ns
re-schedule 10 times 43.80ns 33.8975 1.29 173.25ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 90.88ns 64.2833 1.41 768.16ns
just send variadic 127.77ns 82.0132 1.56 820.07ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 101.83ns 76.6447 1.33 349.02ns
sending of values from observable via map to subscriber 1.34ns 0.716227 1.87 2.69ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1393.20ns 1049.06 1.33 3817.68ns
merge_with 1692.69ns 1260.27 1.34 4113.80ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 614.03ns 451.839 1.36 2910.64ns
sending of values from observable via observe_on to subscriber 90.86ns 65.4056 1.39 246.78ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 22.72ns 21.2549 1.07 11.63ns
on_error 0.68ns 0.577319 1.17 16.81ns
on_completed 0.67ns 0.578023 1.16 0.67ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 215.70ns 123.546 1.75 175.92ns
get_observable 29.47ns 23.8239 1.24 49.40ns
get_subscriber 57.40ns 45.3686 1.27 23.16ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4167.18ns 3137.78 1.33 3297.55ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 137.43ns 98.1919 1.40 393.20ns
sending of values from observable via scan to subscriber 2.68ns 2.29181 1.17 2.35ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 134.53ns 95.9021 1.40 554.61ns
sending of values from observable via skip to subscriber 3.44ns 2.29573 1.50 2.35ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2000.36ns 1478.07 1.35 4245.77ns
sending of values from observable via switch_on_next to subscriber 546.01ns 404.484 1.35 1083.94ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 192.26ns 138.009 1.39 603.85ns
sending of values from observable via take to subscriber 4.03ns 2.58381 1.56 3.80ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 45.88ns 28.215 1.63 190.89ns
re-schedule 10 times 68.09ns 45.9929 1.48 227.76ns
recursively schedule 10 times 1487.78ns 1039.14 1.43 6626.89ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2153.32ns 1598.28 1.35 3275.44ns
sending of values from observable via window to subscriber 588.03ns 427.844 1.37 424.06ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 675.20ns 508.078 1.33 1449.22ns
sending of values from observable via with_latest_from to subscriber 18.12ns 16.0445 1.13 3.97ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 1.82ns 1.50403 1.21 1.62ns
Dynamic observable construction 128.58ns 80.0503 1.61 133.05ns
Specific observable construction + as_dynamic 103.78ns 80.359 1.29 134.54ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 211.21ns 179.2 1.18 1887.13ns
Specific observable lift dynamic observer 237.55ns 208.147 1.14 1949.57ns
Dynamic observable lift specific observer 355.52ns 334.988 1.06 2074.50ns
Dynamic observable lift dynamic observer 316.62ns 265.305 1.19 2069.57ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 174.15ns 143.253 1.22 1881.79ns
Specific observable subscribe dynamic observer 183.09ns 153.396 1.19 2085.93ns
Dynamic observable subscribe specific observer 296.34ns 260.906 1.14 2261.86ns
Dynamic observable subscribe dynamic observer 238.81ns 206.574 1.16 1899.43ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 166.21ns 143.893 1.16 2054.43ns
Dynamic observable subscribe lambda 292.84ns 262.907 1.11 2094.15ns
Specific observable subscribe lambda without subscription 168.33ns 142.685 1.18 1766.85ns
Dynamic observable subscribe lambda without subscription 298.88ns 262.327 1.14 1999.83ns
Specific observable subscribe specific subscriber 56.30ns 47.9197 1.17 874.03ns
Dynamic observable subscribe specific subscriber 184.59ns 163.833 1.13 1046.31ns
Specific observable subscribe dynamic observer 59.84ns 50.878 1.18 888.53ns
Dynamic observable subscribe dynamic observer 112.38ns 100.349 1.12 967.35ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 2.07ns 1.50302 1.37 1.77ns
Dynamic observer construction 94.88ns 81.8548 1.16 126.53ns
Specific observer construction + as_dynamic 92.58ns 82.3529 1.12 132.75ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.76ns 0.672184 1.13 0.76ns
Dynamic observer OnNext 2.36ns 52.209 0.05 2.43ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 103.90ns 91.6533 1.13 998.43ns
Make copy of subscriber 19.44ns 16.7141 1.16 32.01ns
Transform subsriber to dynamic 107.27ns 95.8175 1.12 161.70ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 105.74ns 90.5874 1.17 953.45ns
composite_subscription add 76.90ns 79.2885 0.97 71.83ns
composite_subscription unsubscribe 17.34ns 14.5678 1.19 25.42ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 418.10ns 376.836 1.11 5001.67ns
sending of values from observable via buffer to subscriber 7.37ns 6.71154 1.10 111.51ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 311.82ns 284.684 1.10 1962.29ns
long stateful chain creation + subscribe 773.42ns 672.194 1.15 3249.71ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1150.67ns 1105.38 1.04 3102.00ns
sending of values from observable via combine_latest to subscriber 50.07ns 35.9769 1.39 4.44ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2162.33ns 2070.69 1.04 13147.00ns
concat_with 4539.67ns 2734.8 1.66 13751.50ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 319.92ns 224.773 1.42 1020.81ns
sending of values from observable via distinct_until_changed to subscriber 4.79ns 3.71935 1.29 3.86ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 159.58ns 144.329 1.11 2807.70ns
sending of values from observable via first to subscriber 3.00ns 2.37633 1.26 0.98ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 89.40ns 80.0297 1.12 2599.90ns
error 158.37ns 136.052 1.16 2798.00ns
never 54.85ns 47.3413 1.16 884.04ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 177.38ns 155.364 1.14 2784.70ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 28.70ns 27.7552 1.03 467.90ns
re-schedule 10 times 160.05ns 122.73 1.30 519.20ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 86.61ns 86.6073 1.00 2636.64ns
just send variadic 138.45ns 124.75 1.11 2765.30ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 110.83ns 102.142 1.09 1032.00ns
sending of values from observable via map to subscriber 3.72ns 3.3659 1.11 6.50ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2862.27ns 1974.85 1.45 12834.30ns
merge_with 3750.90ns 2605.3 1.44 15824.00ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 905.82ns 829.379 1.09 5991.20ns
sending of values from observable via observe_on to subscriber 94.81ns 91.2681 1.04 868.71ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 23.71ns 20.1292 1.18 37.18ns
on_error 3.00ns 3.48938 0.86 18.51ns
on_completed 2.60ns 2.70028 0.96 0.68ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 450.16ns 312.712 1.44 641.91ns
get_observable 26.43ns 28.2009 0.94 178.26ns
get_subscriber 61.67ns 51.0932 1.21 94.08ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 10619.20ns 6133.8 1.73 11988.00ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 233.19ns 204.936 1.14 1250.48ns
sending of values from observable via scan to subscriber 6.17ns 5.50899 1.12 9.55ns

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 218.78ns 192.618 1.14 1689.40ns
sending of values from observable via skip to subscriber 5.10ns 4.09443 1.24 3.99ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 3219.50ns 2934.33 1.10 12342.50ns
sending of values from observable via switch_on_next to subscriber 918.45ns 788.909 1.16 3672.33ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 262.83ns 244.968 1.07 2338.25ns
sending of values from observable via take to subscriber 6.51ns 5.32186 1.22 6.42ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 52.40ns 43.0304 1.22 684.05ns
re-schedule 10 times 177.31ns 135.583 1.31 691.47ns
recursively schedule 10 times 3819.88ns 2794.7 1.37 20533.50ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 3355.89ns 2902.78 1.16 10601.70ns
sending of values from observable via window to subscriber 968.93ns 824.548 1.18 1945.31ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1187.33ns 1071.19 1.11 3806.50ns
sending of values from observable via with_latest_from to subscriber 28.82ns 39.517 0.73 7.45ns

@victimsnino victimsnino merged commit 4c4a0d7 into main Aug 30, 2022
@victimsnino victimsnino deleted the fix_memory_leaks branch August 30, 2022 12:24
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