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

Qt scheduler #292

Merged
merged 9 commits into from
Nov 21, 2022
Merged

Qt scheduler #292

merged 9 commits into from
Nov 21, 2022

Conversation

victimsnino
Copy link
Owner

@codecov
Copy link

codecov bot commented Nov 20, 2022

Codecov Report

Merging #292 (37c5b05) into main (ae351ec) will decrease coverage by 0.11%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main     #292      +/-   ##
==========================================
- Coverage   98.48%   98.37%   -0.12%     
==========================================
  Files         108      109       +1     
  Lines        1523     1541      +18     
==========================================
+ Hits         1500     1516      +16     
- Misses         23       25       +2     
Impacted Files Coverage Δ
src/rpp/rpp/schedulers/immediate_scheduler.hpp 100.00% <ø> (ø)
...c/rppqt/rppqt/schedulers/main_thread_scheduler.hpp 83.33% <83.33%> (ø)
src/rpp/rpp/schedulers/details/worker.hpp 100.00% <0.00%> (+5.26%) ⬆️

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

@github-actions
Copy link
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-clang

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.40ns 0.335149 1.20 0.40ns
Dynamic observable construction 32.80ns 29.1868 1.12 29.36ns
Specific observable construction + as_dynamic 32.77ns 29.188 1.12 21.55ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 97.36ns 88.723 1.10 365.92ns
Specific observable lift dynamic observer 125.35ns 112.032 1.12 378.43ns
Dynamic observable lift specific observer 144.69ns 170.117 0.85 347.36ns
Dynamic observable lift dynamic observer 198.28ns 175.344 1.13 354.74ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 62.87ns 57.9993 1.08 346.62ns
Specific observable subscribe dynamic observer 73.91ns 71.3801 1.04 303.57ns
Dynamic observable subscribe specific observer 147.00ns 125.396 1.17 362.69ns
Dynamic observable subscribe dynamic observer 136.65ns 121.322 1.13 354.45ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 50.60ns 58.0164 0.87 344.88ns
Dynamic observable subscribe lambda 104.74ns 124.205 0.84 349.08ns
Specific observable subscribe lambda without subscription 71.54ns 58.0571 1.23 341.64ns
Dynamic observable subscribe lambda without subscription 149.80ns 124.733 1.20 384.15ns
Specific observable subscribe specific subscriber 33.03ns 27.8363 1.19 219.15ns
Dynamic observable subscribe specific subscriber 106.27ns 88.9367 1.19 290.93ns
Specific observable subscribe dynamic observer 33.75ns 27.7975 1.21 280.73ns
Dynamic observable subscribe dynamic observer 85.58ns 75.3823 1.14 298.42ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.38ns 0.335614 1.14 0.39ns
Dynamic observer construction 34.04ns 29.2126 1.17 18.53ns
Specific observer construction + as_dynamic 32.32ns 29.2053 1.11 19.63ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.74ns 0.670315 1.11 0.78ns
Dynamic observer OnNext 2.42ns 2.01158 1.20 2.87ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 38.34ns 34.853 1.10 66.01ns
Make copy of subscriber 16.50ns 16.7362 0.99 5.25ns
Transform subsriber to dynamic 43.77ns 43.4595 1.01 27.68ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 42.13ns 34.8137 1.21 60.54ns
composite_subscription add 56.70ns 49.2932 1.15 93.93ns
composite_subscription unsubscribe 47.82ns 43.3544 1.10 24.96ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 266.80ns 243.193 1.10 1777.16ns
sending of values from observable via buffer to subscriber 6.27ns 5.36352 1.17 33.24ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 231.03ns 254.048 0.91 537.60ns
long stateful chain creation + subscribe 447.96ns 373.432 1.20 1493.32ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 915.84ns 863.408 1.06 898.74ns
sending of values from observable via combine_latest to subscriber 29.57ns 27.4566 1.08 1.77ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2157.70ns 1875.38 1.15 3123.83ns
concat_with 2389.43ns 2157.54 1.11 3713.67ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 105.41ns 110.611 0.95 235.56ns
sending of values from observable via distinct_until_changed to subscriber 3.09ns 2.68211 1.15 2.49ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 126.97ns 123.34 1.03 624.15ns
sending of values from observable via first to subscriber 0.73ns 0.67074 1.08 0.75ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 69.77ns 61.4701 1.14 660.50ns
error 126.04ns 111.517 1.13 692.55ns
never 30.01ns 28.6274 1.05 278.12ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 85.41ns 78.0953 1.09 735.09ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.50ns 1.34101 1.12 135.05ns
re-schedule 10 times 13.21ns 11.4458 1.15 176.39ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 70.72ns 62.8979 1.12 730.48ns
just send variadic 102.67ns 94.7289 1.08 647.62ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 189.28ns 165.614 1.14 349.32ns
sending of values from observable via last to subscriber 2.22ns 2.10544 1.06 1.78ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 70.50ns 68.579 1.03 287.19ns
sending of values from observable via map to subscriber 1.55ns 1.33993 1.16 1.72ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2010.80ns 1799.27 1.12 3337.94ns
merge_with 2408.89ns 2101.44 1.15 3473.72ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 489.56ns 425.246 1.15 2336.80ns
sending of values from observable via observe_on to subscriber 75.84ns 61.2282 1.24 222.47ns

on_error_resume_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_error_resume_next construction from observable via dot + subscribe 482.83ns 418.369 1.15 965.21ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 24.43ns 24.0599 1.02 12.01ns
on_error 0.63ns 0.674483 0.93 20.03ns
on_completed 0.63ns 0.674504 0.93 0.62ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 232.43ns 199.603 1.16 220.86ns
get_observable 27.09ns 26.3991 1.03 56.27ns
get_subscriber 60.30ns 60.6033 0.99 16.10ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4680.06ns 3906.45 1.20 2477.92ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 119.66ns 100.182 1.19 327.99ns
sending of values from observable via scan to subscriber 2.28ns 2.0111 1.13 2.20ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.28ns 2.01953 1.13 .
mutex lock increment 18.71ns 18.0739 1.04 .
spin-lock increment 10.14ns 9.05444 1.12 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 114.72ns 98.32 1.17 541.56ns
sending of values from observable via skip to subscriber 2.70ns 2.34638 1.15 2.01ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 1978.95ns 2212.04 0.89 3199.80ns
sending of values from observable via switch_on_next to subscriber 607.47ns 570.879 1.06 692.13ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 180.83ns 168.686 1.07 518.95ns
sending of values from observable via take to subscriber 2.49ns 2.34313 1.06 3.95ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 222.50ns 208.039 1.07 616.69ns
sending of values from observable via take_last to subscriber 2.93ns 2.69536 1.09 3.25ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1158.67ns 1024.42 1.13 1176.80ns
sending of values from observable via take_until to subscriber 11.00ns 9.81352 1.12 2.06ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 963.66ns 866.909 1.11 15026.20ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 60.39ns 55.848 1.08 13732.10ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 14.22ns 11.3815 1.25 191.85ns
re-schedule 10 times 32.92ns 32.4179 1.02 176.99ns
recursively schedule 10 times 1608.56ns 1397.57 1.15 8679.60ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2227.94ns 2008.29 1.11 3328.51ns
sending of values from observable via window to subscriber 581.36ns 545.775 1.07 408.45ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1067.64ns 1023.29 1.04 1308.74ns
sending of values from observable via with_latest_from to subscriber 31.33ns 27.0185 1.16 3.13ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.39ns 0.402293 0.97 0.35ns
Dynamic observable construction 33.30ns 29.0607 1.15 29.06ns
Specific observable construction + as_dynamic 29.79ns 29.013 1.03 23.46ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 99.85ns 95.3621 1.05 382.44ns
Specific observable lift dynamic observer 125.67ns 130.65 0.96 360.11ns
Dynamic observable lift specific observer 209.76ns 188.714 1.11 408.33ns
Dynamic observable lift dynamic observer 208.59ns 204.013 1.02 380.52ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 60.92ns 60.1969 1.01 363.16ns
Specific observable subscribe dynamic observer 79.23ns 78.6184 1.01 349.69ns
Dynamic observable subscribe specific observer 130.20ns 128.991 1.01 396.20ns
Dynamic observable subscribe dynamic observer 138.39ns 134.247 1.03 438.16ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 57.77ns 60.4546 0.96 368.06ns
Dynamic observable subscribe lambda 164.93ns 131.986 1.25 379.53ns
Specific observable subscribe lambda without subscription 68.01ns 60.2918 1.13 349.53ns
Dynamic observable subscribe lambda without subscription 134.13ns 130.573 1.03 405.71ns
Specific observable subscribe specific subscriber 33.33ns 26.5694 1.25 277.31ns
Dynamic observable subscribe specific subscriber 109.26ns 96.4431 1.13 340.66ns
Specific observable subscribe dynamic observer 30.24ns 26.6648 1.13 295.92ns
Dynamic observable subscribe dynamic observer 85.51ns 90.1954 0.95 351.08ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.33ns 0.401964 0.82 0.34ns
Dynamic observer construction 28.55ns 28.9808 0.98 19.46ns
Specific observer construction + as_dynamic 28.50ns 28.9546 0.98 21.29ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.33ns 0.428187 0.76 0.33ns
Dynamic observer OnNext 2.07ns 2.00807 1.03 2.17ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 34.65ns 33.4523 1.04 62.39ns
Make copy of subscriber 17.54ns 16.0993 1.09 5.47ns
Transform subsriber to dynamic 48.05ns 44.6078 1.08 25.10ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 36.12ns 33.7791 1.07 66.18ns
composite_subscription add 54.49ns 51.709 1.05 98.60ns
composite_subscription unsubscribe 46.91ns 45.0604 1.04 22.75ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 270.35ns 233.698 1.16 2151.01ns
sending of values from observable via buffer to subscriber 6.84ns 6.78362 1.01 35.22ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 330.07ns 332.749 0.99 737.61ns
long stateful chain creation + subscribe 438.16ns 448.106 0.98 1496.45ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 921.89ns 945.996 0.97 1288.64ns
sending of values from observable via combine_latest to subscriber 31.58ns 33.74 0.94 1.76ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1995.08ns 2011.13 0.99 4196.73ns
concat_with 2576.26ns 2392.84 1.08 4505.73ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 137.60ns 119.386 1.15 414.92ns
sending of values from observable via distinct_until_changed to subscriber 3.06ns 3.20927 0.95 1.30ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 147.12ns 148.04 0.99 806.75ns
sending of values from observable via first to subscriber 0.74ns 0.803267 0.93 0.50ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 71.67ns 67.7562 1.06 842.80ns
error 122.62ns 126.417 0.97 899.00ns
never 36.74ns 28.9332 1.27 340.70ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 91.31ns 82.9654 1.10 912.25ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 0.84ns 0.804488 1.04 136.36ns
re-schedule 10 times 18.70ns 19.0974 0.98 163.27ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 73.67ns 70.8388 1.04 785.66ns
just send variadic 109.56ns 92.7093 1.18 884.75ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 178.14ns 180.894 0.98 489.86ns
sending of values from observable via last to subscriber 3.54ns 1.75096 2.02 1.30ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 92.31ns 79.7011 1.16 371.97ns
sending of values from observable via map to subscriber 0.87ns 0.80358 1.09 1.58ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2060.72ns 1991.99 1.03 4372.88ns
merge_with 2312.18ns 2355.84 0.98 4483.30ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 527.12ns 482.739 1.09 3063.61ns
sending of values from observable via observe_on to subscriber 69.43ns 72.2983 0.96 298.82ns

on_error_resume_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_error_resume_next construction from observable via dot + subscribe 512.74ns 452.757 1.13 886.57ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 22.77ns 29.7272 0.77 10.50ns
on_error 0.65ns 0.809279 0.81 17.98ns
on_completed 0.70ns 0.815621 0.86 0.65ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 222.72ns 213.081 1.05 217.95ns
get_observable 29.41ns 30.4936 0.96 45.81ns
get_subscriber 58.90ns 63.4845 0.93 23.95ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4702.16ns 4357.84 1.08 3434.90ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 130.64ns 115.614 1.13 436.60ns
sending of values from observable via scan to subscriber 2.08ns 2.01083 1.03 1.77ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.46ns 2.79493 0.88 .
mutex lock increment 20.66ns 22.5061 0.92 .
spin-lock increment 11.34ns 10.4413 1.09 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 113.92ns 117.167 0.97 550.61ns
sending of values from observable via skip to subscriber 2.45ns 3.1566 0.77 2.24ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2782.26ns 2450.08 1.14 5380.01ns
sending of values from observable via switch_on_next to subscriber 1034.14ns 653.176 1.58 1278.73ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 187.94ns 172.597 1.09 685.91ns
sending of values from observable via take to subscriber 4.60ns 4.0802 1.13 3.66ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 227.43ns 213.839 1.06 699.25ns
sending of values from observable via take_last to subscriber 3.61ns 3.24057 1.12 6.29ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1103.47ns 1123.77 0.98 1631.24ns
sending of values from observable via take_until to subscriber 11.33ns 10.4241 1.09 2.02ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 927.42ns 938.309 0.99 17432.20ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 58.25ns 61.5779 0.95 17918.60ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 26.66ns 20.8285 1.28 188.05ns
re-schedule 10 times 51.27ns 42.4211 1.21 229.08ns
recursively schedule 10 times 1822.11ns 1496.14 1.22 11024.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2239.17ns 2233.53 1.00 3428.64ns
sending of values from observable via window to subscriber 580.82ns 610.664 0.95 491.76ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1247.24ns 1113.94 1.12 1802.01ns
sending of values from observable via with_latest_from to subscriber 42.60ns 31.7897 1.34 4.23ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 2.00ns 2.06167 0.97 0.42ns
Dynamic observable construction 71.31ns 163.764 0.44 117.43ns
Specific observable construction + as_dynamic 71.51ns 100.391 0.71 117.53ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 135.69ns 174.25 0.78 1188.00ns
Specific observable lift dynamic observer 170.98ns 220.97 0.77 1243.67ns
Dynamic observable lift specific observer 265.36ns 363.955 0.73 1380.06ns
Dynamic observable lift dynamic observer 236.47ns 304.327 0.78 1284.35ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 100.97ns 164.515 0.61 1140.64ns
Specific observable subscribe dynamic observer 117.95ns 163.529 0.72 1182.73ns
Dynamic observable subscribe specific observer 206.28ns 272.336 0.76 1338.84ns
Dynamic observable subscribe dynamic observer 172.03ns 210.158 0.82 1301.95ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 97.52ns 138.62 0.70 1136.86ns
Dynamic observable subscribe lambda 206.57ns 310.704 0.66 1314.25ns
Specific observable subscribe lambda without subscription 97.76ns 140.601 0.70 1130.18ns
Dynamic observable subscribe lambda without subscription 206.58ns 329.295 0.63 1315.35ns
Specific observable subscribe specific subscriber 26.50ns 39.0 0.68 838.90ns
Dynamic observable subscribe specific subscriber 131.69ns 185.573 0.71 1004.48ns
Specific observable subscribe dynamic observer 26.66ns 37.7137 0.71 867.52ns
Dynamic observable subscribe dynamic observer 78.77ns 93.1641 0.85 906.46ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 2.01ns 1.92477 1.04 2.01ns
Dynamic observer construction 71.57ns 104.976 0.68 103.81ns
Specific observer construction + as_dynamic 72.00ns 105.814 0.68 105.10ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.45ns 0.823926 0.54 0.42ns
Dynamic observer OnNext 2.02ns 2.40518 0.84 2.01ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 73.04ns 105.722 0.69 337.79ns
Make copy of subscriber 16.06ns 18.9933 0.85 38.34ns
Transform subsriber to dynamic 85.14ns 119.85 0.71 140.75ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 72.60ns 106.483 0.68 326.77ns
composite_subscription add 66.88ns 90.4915 0.74 177.73ns
composite_subscription unsubscribe 61.01ns 74.7548 0.82 116.62ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 336.66ns 441.902 0.76 4407.67ns
sending of values from observable via buffer to subscriber 7.62ns 8.87911 0.86 90.42ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 296.87ns 319.265 0.93 1710.67ns
long stateful chain creation + subscribe 634.58ns 789.485 0.80 3329.25ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1524.81ns 1984.79 0.77 3089.71ns
sending of values from observable via combine_latest to subscriber 46.06ns 58.0054 0.79 3.84ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2648.30ns 3314.44 0.80 10604.00ns
concat_with 3357.00ns 4787.25 0.70 11562.00ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 176.67ns 248.985 0.71 1015.72ns
sending of values from observable via distinct_until_changed to subscriber 3.21ns 7.30621 0.44 3.62ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 139.52ns 157.418 0.89 2625.70ns
sending of values from observable via first to subscriber 2.52ns 3.01992 0.83 1.22ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 64.21ns 85.4186 0.75 2358.18ns
error 119.09ns 144.718 0.82 2515.50ns
never 28.19ns 37.4602 0.75 867.54ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 122.06ns 164.84 0.74 2415.40ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.44ns 1.63393 0.88 405.70ns
re-schedule 10 times 130.52ns 135.167 0.97 437.82ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 65.88ns 83.5267 0.79 2357.82ns
just send variadic 97.64ns 121.52 0.80 2444.10ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 217.50ns 272.756 0.80 1437.47ns
sending of values from observable via last to subscriber 3.21ns 4.20601 0.76 3.80ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 95.04ns 107.257 0.89 980.62ns
sending of values from observable via map to subscriber 3.59ns 4.13251 0.87 7.23ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2616.90ns 3187.44 0.82 11099.70ns
merge_with 3289.62ns 4259.86 0.77 11785.30ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 625.40ns 798.857 0.78 5653.00ns
sending of values from observable via observe_on to subscriber 61.64ns 80.9918 0.76 796.70ns

on_error_resume_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_error_resume_next construction from observable via dot + subscribe 622.51ns 768.684 0.81 1843.54ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 22.61ns 24.473 0.92 29.06ns
on_error 2.62ns 3.48252 0.75 19.17ns
on_completed 2.95ns 2.99291 0.99 0.81ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 337.35ns 408.508 0.83 632.78ns
get_observable 30.99ns 34.5879 0.90 155.93ns
get_subscriber 61.50ns 65.7312 0.94 100.51ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 5836.80ns 8219.0 0.71 11292.30ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 168.20ns 223.559 0.75 1253.50ns
sending of values from observable via scan to subscriber 5.71ns 8.264 0.69 8.75ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 3.06ns 3.13525 0.98 .
mutex lock increment 24.12ns 33.3062 0.72 .
spin-lock increment 10.46ns 14.37 0.73 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 171.33ns 202.113 0.85 1606.67ns
sending of values from observable via skip to subscriber 3.23ns 4.42404 0.73 3.64ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 3381.88ns 4272.43 0.79 11998.50ns
sending of values from observable via switch_on_next to subscriber 830.83ns 1023.66 0.81 3046.56ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 226.08ns 278.309 0.81 2137.75ns
sending of values from observable via take to subscriber 5.48ns 6.00245 0.91 5.70ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 308.08ns 510.164 0.60 2408.82ns
sending of values from observable via take_last to subscriber 4.39ns 4.70311 0.93 19.51ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1514.25ns 1849.27 0.82 5276.20ns
sending of values from observable via take_until to subscriber 12.86ns 13.9432 0.92 4.95ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 1211.89ns 1639.44 0.74 5451.75ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 58.14ns 68.4946 0.85 1384.25ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 18.69ns 21.9048 0.85 594.88ns
re-schedule 10 times 145.21ns 141.308 1.03 630.42ns
recursively schedule 10 times 2422.09ns 3628.22 0.67 19262.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2916.11ns 3432.0 0.85 9451.33ns
sending of values from observable via window to subscriber 819.68ns 1125.41 0.73 1584.12ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1815.54ns 2644.0 0.69 3876.00ns
sending of values from observable via with_latest_from to subscriber 37.18ns 43.0419 0.86 6.69ns

@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 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@victimsnino victimsnino merged commit 251f885 into main Nov 21, 2022
@victimsnino victimsnino deleted the qt_scheduler branch November 21, 2022 20:03
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