Skip to content

Commit

Permalink
Update contibuting
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino authored Nov 8, 2022
1 parent a015885 commit af05712
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
13 changes: 13 additions & 0 deletions contributing.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ int my_short_function()
}

```
## Tricky moments
### Inline constraints/conepts
When you are developing new operators be sure, that your lift-operator doesn't use inline constraints over subscribers like this:
```cpp
void operator(auto&& value, const constraint::subscriber auto& subscribier)
```
In this case intellisense of VS Code can't deduce final type of observable. Prefer this one:
```cpp
template<constraint::subscriber TSub>
void operator(auto&& value, const TSub& subscribier)
```
14 changes: 0 additions & 14 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,5 @@ These targets run the codespell tool on the codebase to check errors and to fix
them respectively. Customization available using the `SPELL_COMMAND` cache
variable. -->


## Tricky moments

### Inline constraints/conepts
When you are developing new operators be sure, that your lift-operator doesn't use inline constraints over subscribers like this:
```cpp
void operator(auto&& value, const constraint::subscriber auto& subscribier)
```
In this case intellisense of VS Code can't deduce final type of observable. Prefer this one:
```cpp
template<constraint::subscriber TSub>
void operator(auto&& value, const TSub& subscribier)
```

[1]: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
[2]: https://cmake.org/download/

1 comment on commit af05712

@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-clang

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.34ns 0.403613 0.83 0.33ns
Dynamic observable construction 29.13ns 28.7355 1.01 24.18ns
Specific observable construction + as_dynamic 29.16ns 31.5216 0.93 24.19ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 88.88ns 92.1416 0.96 289.94ns
Specific observable lift dynamic observer 110.72ns 118.545 0.93 307.94ns
Dynamic observable lift specific observer 170.17ns 171.401 0.99 350.10ns
Dynamic observable lift dynamic observer 177.19ns 188.443 0.94 321.62ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 58.05ns 71.7353 0.81 287.23ns
Specific observable subscribe dynamic observer 71.47ns 71.4146 1.00 295.94ns
Dynamic observable subscribe specific observer 129.13ns 122.359 1.06 329.60ns
Dynamic observable subscribe dynamic observer 123.79ns 126.342 0.98 317.48ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 57.95ns 56.4261 1.03 288.76ns
Dynamic observable subscribe lambda 124.01ns 124.07 1.00 326.43ns
Specific observable subscribe lambda without subscription 57.99ns 56.6225 1.02 288.74ns
Dynamic observable subscribe lambda without subscription 124.22ns 120.474 1.03 329.73ns
Specific observable subscribe specific subscriber 27.85ns 25.7691 1.08 227.97ns
Dynamic observable subscribe specific subscriber 88.44ns 88.5452 1.00 270.65ns
Specific observable subscribe dynamic observer 27.80ns 25.7142 1.08 240.87ns
Dynamic observable subscribe dynamic observer 77.87ns 77.2633 1.01 259.30ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.34ns 0.401215 0.84 0.34ns
Dynamic observer construction 29.26ns 28.7839 1.02 21.39ns
Specific observer construction + as_dynamic 29.20ns 28.9066 1.01 21.32ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.442192 1.51 0.67ns
Dynamic observer OnNext 2.01ns 2.01116 1.00 2.34ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 34.85ns 34.9683 1.00 64.74ns
Make copy of subscriber 16.74ns 18.9232 0.88 4.69ns
Transform subsriber to dynamic 43.54ns 47.4203 0.92 26.01ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 34.84ns 32.751 1.06 51.62ns
composite_subscription add 47.43ns 54.0542 0.88 93.71ns
composite_subscription unsubscribe 43.40ns 44.2979 0.98 23.39ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 246.43ns 242.712 1.02 1831.27ns
sending of values from observable via buffer to subscriber 5.37ns 4.81918 1.11 27.87ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 254.99ns 280.561 0.91 503.20ns
long stateful chain creation + subscribe 371.43ns 404.204 0.92 1528.05ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 859.49ns 914.192 0.94 920.25ns
sending of values from observable via combine_latest to subscriber 27.45ns 34.0775 0.81 1.75ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1876.32ns 1977.65 0.95 3279.84ns
concat_with 2166.46ns 2336.05 0.93 3787.82ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 110.61ns 111.594 0.99 247.32ns
sending of values from observable via distinct_until_changed to subscriber 2.68ns 2.41224 1.11 2.34ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 124.77ns 135.971 0.92 578.37ns
sending of values from observable via first to subscriber 0.67ns 0.803748 0.83 0.67ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 61.71ns 64.8783 0.95 618.61ns
error 112.13ns 113.086 0.99 749.36ns
never 28.73ns 26.7163 1.08 250.13ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 79.66ns 77.0802 1.03 653.43ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.34ns 0.737866 1.82 112.28ns
re-schedule 10 times 11.46ns 10.9084 1.05 143.50ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 64.54ns 65.6439 0.98 647.05ns
just send variadic 94.61ns 89.6107 1.06 737.83ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 169.20ns 171.407 0.99 353.77ns
sending of values from observable via last to subscriber 2.06ns 2.19231 0.94 1.68ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 68.60ns 76.775 0.89 239.31ns
sending of values from observable via map to subscriber 1.34ns 0.804569 1.66 1.53ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1815.77ns 1902.32 0.95 3320.94ns
merge_with 2115.76ns 2285.13 0.93 3550.48ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 424.17ns 440.821 0.96 2598.28ns
sending of values from observable via observe_on to subscriber 61.52ns 59.438 1.03 199.67ns

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 421.85ns 435.965 0.97 971.06ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 24.09ns 30.3732 0.79 10.73ns
on_error 0.67ns 0.605698 1.11 19.17ns
on_completed 0.67ns 0.605818 1.11 0.67ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 187.85ns 196.931 0.95 182.59ns
get_observable 26.54ns 33.7957 0.79 50.33ns
get_subscriber 60.56ns 66.6676 0.91 13.24ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 3887.53ns 4174.39 0.93 3037.73ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 102.65ns 106.734 0.96 295.32ns
sending of values from observable via scan to subscriber 2.01ns 2.01005 1.00 2.01ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.02ns 3.15802 0.64 .
mutex lock increment 18.07ns 22.5247 0.80 .
spin-lock increment 9.04ns 10.4524 0.87 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 98.82ns 104.621 0.94 487.54ns
sending of values from observable via skip to subscriber 2.34ns 2.4133 0.97 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 2198.37ns 2324.21 0.95 2826.03ns
sending of values from observable via switch_on_next to subscriber 580.04ns 608.515 0.95 640.86ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 169.60ns 180.464 0.94 492.09ns
sending of values from observable via take to subscriber 2.35ns 2.03949 1.15 3.36ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 210.34ns 216.647 0.97 525.96ns
sending of values from observable via take_last to subscriber 2.70ns 3.28754 0.82 3.78ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1029.81ns 1078.38 0.95 1176.01ns
sending of values from observable via take_until to subscriber 9.03ns 10.4264 0.87 1.84ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 868.90ns 898.286 0.97 21708.40ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 55.81ns 59.0198 0.95 16591.20ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 11.40ns 10.0619 1.13 161.69ns
re-schedule 10 times 32.56ns 27.2134 1.20 188.62ns
recursively schedule 10 times 1372.42ns 1398.84 0.98 7869.29ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 1990.55ns 2149.05 0.93 3155.04ns
sending of values from observable via window to subscriber 540.74ns 580.895 0.93 365.82ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1016.01ns 1060.07 0.96 1133.85ns
sending of values from observable via with_latest_from to subscriber 27.00ns 29.3476 0.92 3.01ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.40ns 0.401939 1.00 0.40ns
Dynamic observable construction 30.01ns 30.197 0.99 26.17ns
Specific observable construction + as_dynamic 29.92ns 28.674 1.04 26.02ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 100.81ns 95.1143 1.06 340.13ns
Specific observable lift dynamic observer 138.99ns 129.422 1.07 357.21ns
Dynamic observable lift specific observer 190.36ns 189.721 1.00 425.84ns
Dynamic observable lift dynamic observer 211.45ns 206.5 1.02 377.51ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 67.56ns 59.1367 1.14 336.13ns
Specific observable subscribe dynamic observer 76.81ns 76.5608 1.00 353.31ns
Dynamic observable subscribe specific observer 134.87ns 128.546 1.05 385.28ns
Dynamic observable subscribe dynamic observer 140.80ns 133.265 1.06 366.69ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 59.59ns 60.5947 0.98 341.65ns
Dynamic observable subscribe lambda 142.20ns 129.773 1.10 372.96ns
Specific observable subscribe lambda without subscription 59.56ns 59.639 1.00 352.99ns
Dynamic observable subscribe lambda without subscription 143.53ns 130.763 1.10 374.80ns
Specific observable subscribe specific subscriber 27.33ns 27.0621 1.01 272.54ns
Dynamic observable subscribe specific subscriber 97.59ns 97.1967 1.00 315.16ns
Specific observable subscribe dynamic observer 29.71ns 26.9139 1.10 283.13ns
Dynamic observable subscribe dynamic observer 97.63ns 91.1191 1.07 293.29ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.40ns 0.401282 1.00 0.40ns
Dynamic observer construction 28.94ns 29.0071 1.00 18.45ns
Specific observer construction + as_dynamic 29.15ns 28.762 1.01 18.82ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.44ns 0.431636 1.01 0.43ns
Dynamic observer OnNext 2.01ns 2.00875 1.00 1.60ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 33.92ns 33.9029 1.00 67.13ns
Make copy of subscriber 16.07ns 16.0772 1.00 5.92ns
Transform subsriber to dynamic 45.02ns 45.1157 1.00 21.73ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 33.90ns 33.9358 1.00 61.35ns
composite_subscription add 51.75ns 51.6121 1.00 80.49ns
composite_subscription unsubscribe 45.22ns 44.8312 1.01 21.33ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 232.16ns 232.532 1.00 2159.67ns
sending of values from observable via buffer to subscriber 6.60ns 6.61604 1.00 26.17ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 325.97ns 326.775 1.00 695.35ns
long stateful chain creation + subscribe 457.49ns 454.778 1.01 1686.13ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 940.21ns 944.962 0.99 1233.38ns
sending of values from observable via combine_latest to subscriber 33.73ns 33.7635 1.00 1.61ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2021.34ns 2025.74 1.00 4227.44ns
concat_with 2393.16ns 2395.16 1.00 4426.01ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 122.78ns 118.75 1.03 372.63ns
sending of values from observable via distinct_until_changed to subscriber 3.21ns 3.10789 1.03 1.21ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 147.11ns 147.384 1.00 767.80ns
sending of values from observable via first to subscriber 1.21ns 1.2063 1.00 0.81ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 68.35ns 68.4596 1.00 792.03ns
error 116.89ns 116.931 1.00 848.06ns
never 28.98ns 28.9252 1.00 294.21ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 81.38ns 81.3024 1.00 796.40ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 0.80ns 0.803653 1.00 131.20ns
re-schedule 10 times 19.12ns 19.3303 0.99 166.03ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 71.09ns 70.9558 1.00 813.16ns
just send variadic 93.09ns 94.7802 0.98 910.57ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 179.83ns 179.469 1.00 456.77ns
sending of values from observable via last to subscriber 2.00ns 1.82893 1.09 1.16ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 83.87ns 82.5678 1.02 350.50ns
sending of values from observable via map to subscriber 0.80ns 0.803559 1.00 2.00ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1978.27ns 1980.87 1.00 4195.44ns
merge_with 2368.77ns 2358.24 1.00 4840.72ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 480.82ns 488.074 0.99 2698.75ns
sending of values from observable via observe_on to subscriber 71.61ns 71.4029 1.00 232.10ns

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 458.80ns 457.158 1.00 1062.69ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 29.86ns 29.8528 1.00 9.64ns
on_error 0.81ns 0.812019 0.99 16.16ns
on_completed 0.81ns 0.809266 1.00 0.81ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 216.91ns 203.414 1.07 150.95ns
get_observable 33.37ns 33.3456 1.00 45.49ns
get_subscriber 63.92ns 63.9246 1.00 22.46ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4327.58ns 4324.57 1.00 3194.51ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 114.68ns 114.343 1.00 398.63ns
sending of values from observable via scan to subscriber 2.01ns 2.00973 1.00 1.67ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.40ns 2.10052 1.14 .
mutex lock increment 22.05ns 22.0896 1.00 .
spin-lock increment 10.65ns 10.4409 1.02 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 117.14ns 113.256 1.03 555.77ns
sending of values from observable via skip to subscriber 3.23ns 3.21894 1.00 2.76ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2437.26ns 2488.41 0.98 4605.51ns
sending of values from observable via switch_on_next to subscriber 628.41ns 639.825 0.98 1342.17ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 172.88ns 173.143 1.00 618.79ns
sending of values from observable via take to subscriber 4.06ns 4.04526 1.00 3.22ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 215.20ns 216.934 0.99 683.14ns
sending of values from observable via take_last to subscriber 3.39ns 3.35403 1.01 6.43ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1109.63ns 1129.41 0.98 1917.25ns
sending of values from observable via take_until to subscriber 10.45ns 10.4564 1.00 2.11ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 950.12ns 931.868 1.02 13449.90ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 61.99ns 61.9209 1.00 16165.90ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 20.11ns 20.1165 1.00 188.75ns
re-schedule 10 times 39.77ns 39.6308 1.00 217.12ns
recursively schedule 10 times 1395.15ns 1394.33 1.00 11078.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2210.54ns 2286.0 0.97 3343.23ns
sending of values from observable via window to subscriber 605.04ns 614.917 0.98 413.51ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1109.38ns 1116.56 0.99 1595.19ns
sending of values from observable via with_latest_from to subscriber 31.82ns 31.9572 1.00 3.62ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 1.51ns 1.96434 0.77 0.67ns
Dynamic observable construction 81.38ns 86.2265 0.94 124.12ns
Specific observable construction + as_dynamic 81.16ns 104.484 0.78 123.70ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 144.00ns 167.193 0.86 1254.14ns
Specific observable lift dynamic observer 177.60ns 158.986 1.12 1298.20ns
Dynamic observable lift specific observer 286.64ns 287.489 1.00 1436.67ns
Dynamic observable lift dynamic observer 236.17ns 244.31 0.97 1340.35ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 109.80ns 129.363 0.85 1196.82ns
Specific observable subscribe dynamic observer 130.69ns 165.326 0.79 1223.95ns
Dynamic observable subscribe specific observer 230.66ns 251.111 0.92 1383.63ns
Dynamic observable subscribe dynamic observer 178.96ns 167.603 1.07 1479.71ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 111.14ns 117.896 0.94 1186.41ns
Dynamic observable subscribe lambda 229.21ns 248.304 0.92 1380.16ns
Specific observable subscribe lambda without subscription 110.80ns 119.785 0.93 1209.86ns
Dynamic observable subscribe lambda without subscription 228.85ns 249.23 0.92 1402.42ns
Specific observable subscribe specific subscriber 30.45ns 33.9734 0.90 892.73ns
Dynamic observable subscribe specific subscriber 147.85ns 182.054 0.81 1062.24ns
Specific observable subscribe dynamic observer 30.46ns 40.0702 0.76 915.57ns
Dynamic observable subscribe dynamic observer 78.65ns 89.4631 0.88 1023.15ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 1.50ns 1.5047 1.00 1.51ns
Dynamic observer construction 83.15ns 75.0893 1.11 113.48ns
Specific observer construction + as_dynamic 83.08ns 98.2572 0.85 114.00ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.982308 0.68 0.67ns
Dynamic observer OnNext 2.01ns 1.98099 1.01 2.02ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 83.81ns 105.837 0.79 358.80ns
Make copy of subscriber 16.72ns 18.8137 0.89 33.76ns
Transform subsriber to dynamic 97.60ns 82.8262 1.18 158.75ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 84.05ns 105.596 0.80 347.05ns
composite_subscription add 70.72ns 94.3198 0.75 156.89ns
composite_subscription unsubscribe 61.60ns 81.6638 0.75 124.42ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 352.12ns 484.678 0.73 4539.50ns
sending of values from observable via buffer to subscriber 7.30ns 5.97315 1.22 91.91ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 269.85ns 271.976 0.99 1779.36ns
long stateful chain creation + subscribe 658.92ns 802.027 0.82 3257.43ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1669.73ns 2135.62 0.78 3046.50ns
sending of values from observable via combine_latest to subscriber 47.24ns 48.9382 0.97 4.47ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2743.10ns 3898.38 0.70 10739.30ns
concat_with 3414.50ns 4597.71 0.74 11737.30ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 184.71ns 318.715 0.58 1049.12ns
sending of values from observable via distinct_until_changed to subscriber 4.65ns 5.58679 0.83 3.92ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 128.10ns 130.345 0.98 2778.30ns
sending of values from observable via first to subscriber 2.35ns 2.7989 0.84 1.78ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 63.61ns 80.1815 0.79 2415.20ns
error 111.63ns 130.451 0.86 2529.60ns
never 30.76ns 35.9637 0.86 919.67ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 134.96ns 214.702 0.63 2510.70ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.68ns 1.43687 1.17 414.90ns
re-schedule 10 times 97.80ns 94.6756 1.03 444.34ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 66.03ns 75.2961 0.88 2844.70ns
just send variadic 103.02ns 114.606 0.90 2514.80ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 223.46ns 270.185 0.83 1459.65ns
sending of values from observable via last to subscriber 3.20ns 3.90128 0.82 3.31ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 88.30ns 102.535 0.86 1040.60ns
sending of values from observable via map to subscriber 3.51ns 3.90891 0.90 6.98ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2655.20ns 2829.86 0.94 11053.00ns
merge_with 3316.00ns 5012.0 0.66 11786.00ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 623.16ns 780.649 0.80 5789.40ns
sending of values from observable via observe_on to subscriber 64.84ns 80.1818 0.81 913.76ns

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 637.42ns 827.917 0.77 1858.58ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 20.26ns 21.0058 0.96 32.49ns
on_error 2.81ns 2.76957 1.02 18.39ns
on_completed 3.04ns 3.05525 1.00 1.36ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 368.58ns 580.045 0.64 600.88ns
get_observable 26.07ns 35.1333 0.74 162.91ns
get_subscriber 50.16ns 62.9659 0.80 92.39ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 6062.80ns 8607.0 0.70 11305.00ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 181.94ns 208.794 0.87 1289.85ns
sending of values from observable via scan to subscriber 5.40ns 6.06188 0.89 9.46ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 1.88ns 2.78994 0.68 .
mutex lock increment 31.78ns 24.3161 1.31 .
spin-lock increment 9.06ns 15.7269 0.58 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 177.00ns 210.928 0.84 1539.60ns
sending of values from observable via skip to subscriber 3.44ns 3.88006 0.89 4.27ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 3511.00ns 4078.83 0.86 12195.00ns
sending of values from observable via switch_on_next to subscriber 854.47ns 1064.86 0.80 3117.44ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 224.51ns 280.5 0.80 2175.00ns
sending of values from observable via take to subscriber 5.74ns 9.28981 0.62 6.32ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 323.41ns 372.348 0.87 2588.40ns
sending of values from observable via take_last to subscriber 4.24ns 5.12999 0.83 21.07ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1607.69ns 1591.8 1.01 5254.40ns
sending of values from observable via take_until to subscriber 11.39ns 14.4661 0.79 5.44ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 1494.41ns 1790.75 0.83 5673.50ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 55.49ns 64.1215 0.87 1404.00ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 18.81ns 22.0352 0.85 620.54ns
re-schedule 10 times 121.96ns 112.22 1.09 646.79ns
recursively schedule 10 times 2620.40ns 3097.6 0.85 19571.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2935.67ns 3453.89 0.85 9697.00ns
sending of values from observable via window to subscriber 830.74ns 985.862 0.84 1627.69ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 2022.58ns 2737.8 0.74 3795.00ns
sending of values from observable via with_latest_from to subscriber 38.08ns 45.2685 0.84 6.82ns

Please sign in to comment.