Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino authored Nov 3, 2022
1 parent fe10fad commit 51a25e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Reactive programming is excelent programming paradigm and approach for creation
[RxCpp](https://github.com/ReactiveX/RxCpp) is great and awesome library and perfect implementation of ReactiveX approach. However RxCpp has some disadvantages:
- It is a bit **"old" library written in C++11** with some parts written in the **pre-C++11 style** (mess of old-style classes and wrappers)
- **Issue** with **template parameters**: `rxcpp::observable` contains **full chain of operators** as second template parameter... where each operator has a bunch of another template parameters itself. It forces **IDEs** works **slower** while parsing resulting type of observable. Also it forces to generate **heavier binaries and debug symbols and slower build time**.
- It has high perfomance cost due to tremendous amount of usage of heap
- It has high perfomance cost due to tremendous amount of usage of heap.
- Some parts of code written with non-effective logic (e.g. `timeout` operator - rpp version faster in about 17000-25000%...)
Another implementation of RX for c++: [another-rxcpp](https://github.com/CODIANZ/another-rxcpp). It partly solves issues of RxCpp via **eliminating of template parameter** with help of **type-erasing** and making each callback as `std::function`. As a result issue with templates resvoled, but this approach has disadvantages related to runtime: resulting size of observers/observables becomes greater due to heavy `std::function` object, usage of heap for storing everything causes perfomance issues, implementation is just pretty simple and provides a lot of copies of passed objects.
Expand All @@ -44,7 +45,7 @@ Another implementation of RX for c++: [another-rxcpp](https://github.com/CODIANZ
- Concepts provide more clear errors and checks: you will understand that pass something incorrect before compilation in IDE or during compilation with understandable errors instead of _"invalid template class map_invalid_t"_
- Everywhere while possible used deduction of template arguments, for example, type of values of observable by type of subscriber used in on_subscribe and etc
- **ReactivePlusPlus** keeps balance between performance and type-erasing mechanism: Read about it in [**"Performance vs Flexibility: Specific vs Dynamic"**](https://victimsnino.github.io/ReactivePlusPlus/docs/html/specific_vs_dynamic.html)
- **ReactivePlusPlus** is fast: every part of code written with perfomance in mind. Starting from tests over amount of copies/move and finishing to Continous Benchmarking. Benchmarks show that RPP faster that RxCPP in most cases: [Continous benchmarking results](https://victimsnino.github.io/ReactivePlusPlus/benchmark)
- **ReactivePlusPlus** is fast: every part of code written with perfomance in mind. Starting from tests over amount of copies/move and finishing to Continous Benchmarking. Benchmarks prove that RPP faster than RxCPP in most cases: [Continous benchmarking results](https://victimsnino.github.io/ReactivePlusPlus/benchmark) (check timeout operator comparison ;-))
# Useful links
Expand Down

1 comment on commit 51a25e9

@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.40ns 0.335167 1.20 0.40ns
Dynamic observable construction 35.08ns 29.2005 1.20 29.15ns
Specific observable construction + as_dynamic 35.04ns 29.1693 1.20 29.10ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 106.79ns 88.9499 1.20 347.31ns
Specific observable lift dynamic observer 135.37ns 110.465 1.23 376.48ns
Dynamic observable lift specific observer 206.09ns 170.58 1.21 408.53ns
Dynamic observable lift dynamic observer 212.95ns 177.136 1.20 393.65ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 69.69ns 57.9441 1.20 345.56ns
Specific observable subscribe dynamic observer 85.80ns 70.7407 1.21 357.56ns
Dynamic observable subscribe specific observer 153.03ns 127.95 1.20 394.74ns
Dynamic observable subscribe dynamic observer 148.74ns 123.86 1.20 379.83ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 69.70ns 57.917 1.20 345.24ns
Dynamic observable subscribe lambda 148.77ns 123.988 1.20 389.19ns
Specific observable subscribe lambda without subscription 69.76ns 58.0524 1.20 347.16ns
Dynamic observable subscribe lambda without subscription 149.36ns 124.062 1.20 396.52ns
Specific observable subscribe specific subscriber 33.43ns 27.7997 1.20 271.07ns
Dynamic observable subscribe specific subscriber 106.32ns 88.5519 1.20 323.35ns
Specific observable subscribe dynamic observer 33.32ns 27.7591 1.20 288.32ns
Dynamic observable subscribe dynamic observer 93.17ns 77.3592 1.20 315.37ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.40ns 0.335185 1.20 0.40ns
Dynamic observer construction 35.07ns 29.1637 1.20 26.14ns
Specific observer construction + as_dynamic 35.11ns 29.2386 1.20 26.33ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.80ns 0.669068 1.20 0.81ns
Dynamic observer OnNext 2.41ns 2.01824 1.20 2.81ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 41.87ns 34.8896 1.20 78.69ns
Make copy of subscriber 20.11ns 16.7103 1.20 5.65ns
Transform subsriber to dynamic 52.27ns 43.5226 1.20 31.36ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 42.07ns 34.8387 1.21 63.79ns
composite_subscription add 59.51ns 48.8786 1.22 102.58ns
composite_subscription unsubscribe 52.54ns 43.4508 1.21 28.05ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 294.17ns 245.968 1.20 2145.40ns
sending of values from observable via buffer to subscriber 6.43ns 5.39443 1.19 33.37ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 305.29ns 255.172 1.20 602.30ns
long stateful chain creation + subscribe 445.88ns 373.176 1.19 1550.86ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1033.51ns 863.39 1.20 1045.91ns
sending of values from observable via combine_latest to subscriber 32.98ns 27.5005 1.20 2.10ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2231.38ns 1882.59 1.19 3707.03ns
concat_with 2611.22ns 2162.22 1.21 4031.03ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 133.09ns 110.864 1.20 302.15ns
sending of values from observable via distinct_until_changed to subscriber 3.22ns 2.68026 1.20 2.81ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 150.04ns 123.691 1.21 687.75ns
sending of values from observable via first to subscriber 0.81ns 0.670534 1.20 0.81ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 73.88ns 61.7102 1.20 747.90ns
error 134.36ns 111.72 1.20 881.14ns
never 34.45ns 28.78 1.20 302.29ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 95.73ns 79.9113 1.20 790.80ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.61ns 1.34157 1.20 135.37ns
re-schedule 10 times 13.80ns 11.4679 1.20 172.80ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 77.43ns 64.9502 1.19 763.79ns
just send variadic 114.18ns 94.7469 1.21 892.43ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 202.26ns 169.418 1.19 420.10ns
sending of values from observable via last to subscriber 2.48ns 2.13881 1.16 2.01ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 82.32ns 68.5573 1.20 288.70ns
sending of values from observable via map to subscriber 1.61ns 1.33994 1.20 1.81ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2170.77ns 1813.18 1.20 3749.22ns
merge_with 2522.86ns 2113.61 1.19 3941.93ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 518.58ns 423.798 1.22 2988.25ns
sending of values from observable via observe_on to subscriber 75.64ns 61.4653 1.23 238.90ns

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 504.73ns 421.161 1.20 1070.63ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 28.93ns 24.0563 1.20 12.89ns
on_error 0.81ns 0.673988 1.20 23.02ns
on_completed 0.81ns 0.673996 1.20 0.81ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 234.71ns 187.53 1.25 218.10ns
get_observable 31.77ns 26.4648 1.20 61.39ns
get_subscriber 72.73ns 60.578 1.20 15.80ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4686.77ns 3898.76 1.20 3188.96ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 120.31ns 100.1 1.20 352.56ns
sending of values from observable via scan to subscriber 2.41ns 2.00698 1.20 2.41ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.42ns 2.0505 1.18 .
mutex lock increment 21.74ns 18.0531 1.20 .
spin-lock increment 10.86ns 9.02928 1.20 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 118.26ns 98.3183 1.20 554.32ns
sending of values from observable via skip to subscriber 2.81ns 2.34181 1.20 2.14ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2640.80ns 2204.43 1.20 3728.88ns
sending of values from observable via switch_on_next to subscriber 683.97ns 582.29 1.17 776.21ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 203.28ns 169.216 1.20 581.23ns
sending of values from observable via take to subscriber 2.82ns 2.34463 1.20 4.04ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 253.83ns 211.515 1.20 625.26ns
sending of values from observable via take_last to subscriber 3.24ns 2.69402 1.20 4.58ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1239.17ns 1029.04 1.20 1441.01ns
sending of values from observable via take_until to subscriber 10.84ns 9.02445 1.20 2.21ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 1036.38ns 867.489 1.19 15618.60ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 67.04ns 55.7501 1.20 14557.90ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 14.91ns 11.3915 1.31 193.56ns
re-schedule 10 times 39.37ns 32.5882 1.21 226.48ns
recursively schedule 10 times 1658.96ns 1396.14 1.19 8767.51ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2393.34ns 1994.38 1.20 3671.12ns
sending of values from observable via window to subscriber 655.87ns 540.787 1.21 438.22ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1218.73ns 1016.77 1.20 1276.62ns
sending of values from observable via with_latest_from to subscriber 32.58ns 27.0551 1.20 3.62ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.37ns 0.334585 1.09 0.37ns
Dynamic observable construction 33.88ns 31.6102 1.07 22.25ns
Specific observable construction + as_dynamic 33.72ns 31.5258 1.07 19.73ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 105.33ns 97.6898 1.08 324.27ns
Specific observable lift dynamic observer 129.16ns 126.827 1.02 355.26ns
Dynamic observable lift specific observer 196.29ns 181.251 1.08 410.33ns
Dynamic observable lift dynamic observer 203.89ns 192.448 1.06 414.30ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 54.67ns 60.7564 0.90 401.26ns
Specific observable subscribe dynamic observer 76.10ns 77.5049 0.98 363.71ns
Dynamic observable subscribe specific observer 129.28ns 130.539 0.99 380.61ns
Dynamic observable subscribe dynamic observer 105.96ns 127.04 0.83 292.50ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 59.56ns 60.9193 0.98 279.08ns
Dynamic observable subscribe lambda 108.98ns 130.554 0.83 402.04ns
Specific observable subscribe lambda without subscription 59.56ns 60.8946 0.98 356.43ns
Dynamic observable subscribe lambda without subscription 145.66ns 130.766 1.11 365.94ns
Specific observable subscribe specific subscriber 29.45ns 30.4646 0.97 227.50ns
Dynamic observable subscribe specific subscriber 99.45ns 98.1854 1.01 331.91ns
Specific observable subscribe dynamic observer 28.00ns 30.5157 0.92 306.22ns
Dynamic observable subscribe dynamic observer 97.64ns 85.1691 1.15 309.28ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.30ns 0.335266 0.91 0.30ns
Dynamic observer construction 35.39ns 31.5523 1.12 20.14ns
Specific observer construction + as_dynamic 26.31ns 31.5327 0.83 23.47ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.36ns 0.335032 1.09 0.35ns
Dynamic observer OnNext 2.31ns 2.00764 1.15 1.79ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 30.06ns 34.4363 0.87 53.72ns
Make copy of subscriber 18.03ns 16.7358 1.08 4.62ns
Transform subsriber to dynamic 43.20ns 44.3616 0.97 28.71ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 34.62ns 34.4987 1.00 48.98ns
composite_subscription add 50.32ns 49.1432 1.02 99.76ns
composite_subscription unsubscribe 45.11ns 41.6238 1.08 23.86ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 232.04ns 236.344 0.98 1933.49ns
sending of values from observable via buffer to subscriber 6.54ns 6.06968 1.08 35.29ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 292.35ns 288.004 1.02 670.54ns
long stateful chain creation + subscribe 463.01ns 425.048 1.09 2192.08ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 928.16ns 914.977 1.01 1189.33ns
sending of values from observable via combine_latest to subscriber 32.64ns 28.0853 1.16 2.65ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2060.36ns 1902.15 1.08 3557.71ns
concat_with 2418.72ns 2246.6 1.08 4020.16ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 125.28ns 121.222 1.03 425.21ns
sending of values from observable via distinct_until_changed to subscriber 3.24ns 2.7149 1.19 2.59ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 145.55ns 137.506 1.06 798.28ns
sending of values from observable via first to subscriber 1.31ns 1.3392 0.97 1.10ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 65.40ns 67.155 0.97 840.88ns
error 111.25ns 116.75 0.95 887.62ns
never 30.16ns 32.3904 0.93 235.84ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 99.21ns 84.9497 1.17 811.96ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.27ns 1.34126 0.95 110.04ns
re-schedule 10 times 16.25ns 15.2443 1.07 156.00ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 64.82ns 70.6261 0.92 815.67ns
just send variadic 109.33ns 109.88 1.00 722.22ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 162.78ns 176.496 0.92 512.50ns
sending of values from observable via last to subscriber 2.61ns 2.34109 1.11 1.62ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 87.08ns 81.9516 1.06 317.77ns
sending of values from observable via map to subscriber 0.81ns 0.752448 1.07 2.64ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2211.38ns 1870.4 1.18 3781.42ns
merge_with 1838.09ns 2208.1 0.83 4676.56ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 450.65ns 469.406 0.96 2679.28ns
sending of values from observable via observe_on to subscriber 74.34ns 63.1 1.18 267.77ns

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 485.02ns 435.975 1.11 731.54ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 25.47ns 22.4344 1.14 11.28ns
on_error 0.56ns 0.673236 0.83 17.52ns
on_completed 0.66ns 0.674328 0.98 0.64ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 215.74ns 203.784 1.06 194.73ns
get_observable 28.05ns 29.4638 0.95 51.59ns
get_subscriber 48.48ns 57.4315 0.84 20.48ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4168.40ns 4126.68 1.01 3431.84ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 107.69ns 116.391 0.93 394.80ns
sending of values from observable via scan to subscriber 2.00ns 2.00919 0.99 1.58ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.32ns 2.0098 1.15 .
mutex lock increment 20.24ns 18.0851 1.12 .
spin-lock increment 10.67ns 9.03833 1.18 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 119.71ns 114.917 1.04 496.16ns
sending of values from observable via skip to subscriber 2.39ns 2.6912 0.89 2.29ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2352.81ns 2343.03 1.00 4939.06ns
sending of values from observable via switch_on_next to subscriber 530.86ns 601.527 0.88 1230.24ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 201.02ns 171.863 1.17 633.12ns
sending of values from observable via take to subscriber 3.96ns 3.50744 1.13 3.08ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 229.06ns 206.373 1.11 539.27ns
sending of values from observable via take_last to subscriber 3.57ns 3.37573 1.06 6.26ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1025.67ns 1068.73 0.96 1845.71ns
sending of values from observable via take_until to subscriber 8.45ns 10.2511 0.82 1.86ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 1033.42ns 940.776 1.10 17468.30ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 65.47ns 60.438 1.08 14030.60ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 21.23ns 20.8294 1.02 153.96ns
re-schedule 10 times 54.46ns 50.9296 1.07 228.92ns
recursively schedule 10 times 1330.88ns 1444.64 0.92 8650.85ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2255.41ns 2135.17 1.06 3355.14ns
sending of values from observable via window to subscriber 670.81ns 591.772 1.13 502.31ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1171.10ns 1094.01 1.07 1433.18ns
sending of values from observable via with_latest_from to subscriber 27.12ns 26.782 1.01 4.49ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 1.50ns 1.83244 0.82 0.67ns
Dynamic observable construction 80.49ns 96.1889 0.84 122.88ns
Specific observable construction + as_dynamic 79.96ns 97.5485 0.82 123.56ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 143.44ns 203.13 0.71 1279.24ns
Specific observable lift dynamic observer 176.76ns 218.439 0.81 1287.75ns
Dynamic observable lift specific observer 283.71ns 345.044 0.82 1423.72ns
Dynamic observable lift dynamic observer 235.66ns 293.587 0.80 1333.55ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 109.95ns 132.876 0.83 1452.41ns
Specific observable subscribe dynamic observer 130.25ns 177.959 0.73 1228.52ns
Dynamic observable subscribe specific observer 227.15ns 266.535 0.85 1374.42ns
Dynamic observable subscribe dynamic observer 179.11ns 213.295 0.84 1266.50ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 111.78ns 140.534 0.80 1195.45ns
Dynamic observable subscribe lambda 227.87ns 265.592 0.86 1378.00ns
Specific observable subscribe lambda without subscription 111.57ns 129.131 0.86 1194.18ns
Dynamic observable subscribe lambda without subscription 226.81ns 283.211 0.80 1378.74ns
Specific observable subscribe specific subscriber 30.45ns 34.9415 0.87 863.70ns
Dynamic observable subscribe specific subscriber 145.72ns 211.966 0.69 1046.08ns
Specific observable subscribe dynamic observer 30.47ns 40.8881 0.75 896.10ns
Dynamic observable subscribe dynamic observer 78.68ns 94.434 0.83 929.18ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 1.50ns 1.8079 0.83 1.50ns
Dynamic observer construction 81.45ns 100.113 0.81 113.86ns
Specific observer construction + as_dynamic 81.83ns 105.729 0.77 114.02ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.800227 0.84 0.75ns
Dynamic observer OnNext 1.84ns 2.20387 0.83 2.01ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 84.54ns 105.103 0.80 356.79ns
Make copy of subscriber 16.72ns 26.9063 0.62 33.76ns
Transform subsriber to dynamic 95.71ns 110.15 0.87 151.26ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 84.28ns 117.119 0.72 353.34ns
composite_subscription add 69.23ns 82.3321 0.84 152.38ns
composite_subscription unsubscribe 63.16ns 77.3058 0.82 123.02ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 350.61ns 412.3 0.85 4507.50ns
sending of values from observable via buffer to subscriber 6.49ns 7.76935 0.83 92.23ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 268.67ns 328.753 0.82 1760.46ns
long stateful chain creation + subscribe 658.49ns 790.718 0.83 3186.50ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1637.81ns 2146.79 0.76 3022.50ns
sending of values from observable via combine_latest to subscriber 47.05ns 56.98 0.83 4.48ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2736.90ns 3727.7 0.73 10641.70ns
concat_with 3400.38ns 4314.12 0.79 11725.70ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 185.54ns 221.338 0.84 1034.56ns
sending of values from observable via distinct_until_changed to subscriber 3.35ns 4.06606 0.82 4.00ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 127.99ns 153.667 0.83 3111.00ns
sending of values from observable via first to subscriber 2.35ns 2.7874 0.84 1.80ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 69.06ns 73.7199 0.94 2651.55ns
error 111.67ns 138.948 0.80 2502.70ns
never 30.55ns 35.9019 0.85 893.15ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 134.98ns 159.019 0.85 2501.10ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.68ns 2.06977 0.81 408.70ns
re-schedule 10 times 97.84ns 117.314 0.83 437.69ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 66.17ns 81.3679 0.81 2492.27ns
just send variadic 103.48ns 120.581 0.86 2965.70ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 223.56ns 271.988 0.82 1462.80ns
sending of values from observable via last to subscriber 3.20ns 4.14355 0.77 3.33ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 87.69ns 106.156 0.83 1009.54ns
sending of values from observable via map to subscriber 3.51ns 4.21441 0.83 6.90ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2663.40ns 3614.2 0.74 11009.00ns
merge_with 3316.75ns 4522.5 0.73 11731.70ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 623.23ns 834.077 0.75 5570.40ns
sending of values from observable via observe_on to subscriber 65.11ns 93.7105 0.69 848.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 638.79ns 781.947 0.82 1818.38ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 19.76ns 26.176 0.75 32.49ns
on_error 2.82ns 3.3781 0.83 18.35ns
on_completed 3.04ns 5.7769 0.53 1.36ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 360.19ns 423.984 0.85 604.73ns
get_observable 26.07ns 31.7359 0.82 163.38ns
get_subscriber 50.27ns 60.1923 0.84 93.81ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 6039.20ns 9200.75 0.66 11254.00ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 190.84ns 213.993 0.89 1250.24ns
sending of values from observable via scan to subscriber 5.50ns 6.60293 0.83 9.43ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 1.88ns 4.10809 0.46 .
mutex lock increment 25.84ns 30.993 0.83 .
spin-lock increment 9.03ns 10.6304 0.85 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 177.79ns 218.638 0.81 2120.13ns
sending of values from observable via skip to subscriber 4.20ns 5.00248 0.84 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 3526.75ns 4138.75 0.85 11983.70ns
sending of values from observable via switch_on_next to subscriber 964.70ns 1040.43 0.93 3077.44ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 224.66ns 269.902 0.83 2199.17ns
sending of values from observable via take to subscriber 5.47ns 6.93779 0.79 6.26ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 322.30ns 388.928 0.83 2444.09ns
sending of values from observable via take_last to subscriber 4.26ns 4.91331 0.87 20.40ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1577.06ns 2077.06 0.76 5220.20ns
sending of values from observable via take_until to subscriber 11.63ns 14.9548 0.78 5.34ns

timeout

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
timeout construction from observable via dot + subscribe with run_loop 1264.61ns 1600.67 0.79 5478.25ns
sending of values from observable via timeout to subscriber with unreachable timeout interval with run_loop 54.66ns 67.0389 0.82 1311.41ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 18.72ns 22.3909 0.84 618.29ns
re-schedule 10 times 121.51ns 142.197 0.85 647.70ns
recursively schedule 10 times 2621.60ns 3184.0 0.82 18979.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2928.78ns 3648.12 0.80 9667.67ns
sending of values from observable via window to subscriber 830.29ns 1005.32 0.83 1622.75ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 2006.08ns 2510.92 0.80 3748.67ns
sending of values from observable via with_latest_from to subscriber 38.10ns 40.1489 0.95 6.85ns

Please sign in to comment.