Skip to content

add new benchmarks#676

Merged
AlexInLog merged 1 commit into
v2from
benchmarks
Nov 6, 2024
Merged

add new benchmarks#676
AlexInLog merged 1 commit into
v2from
benchmarks

Conversation

@AlexInLog

@AlexInLog AlexInLog commented Nov 6, 2024

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Introduced a new benchmark test for the concat() operator in the "Combining Operators" category, enhancing performance evaluation capabilities.
  • Documentation

    • Updated the benchmarking suite to include consistent structure and execution for the new test case.

@coderabbitai

coderabbitai Bot commented Nov 6, 2024

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The changes introduce a new section in the benchmarking tests for the "Combining Operators" category within the benchmarks.cpp file. This addition includes a test case specifically for the concat() operator, which benchmarks its performance when applied to two immediate sources. The structure of this new test aligns with existing benchmarks, ensuring consistency in the testing framework without altering any existing functionality or control flow.

Changes

File Change Summary
src/benchmarks/benchmarks.cpp Added a new section for benchmarking the concat() operator with immediate sources using TEST_RPP macro.

Poem

In the land of code where rabbits play,
A new test blooms in a bright array.
With concat() joining, oh what a sight,
Benchmarking joy in the soft moonlight.
Hops of progress, swift and true,
Celebrating changes, just for you! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 93eb3b7 and e2a1c35.

📒 Files selected for processing (1)
  • src/benchmarks/benchmarks.cpp (1 hunks)
🔇 Additional comments (1)
src/benchmarks/benchmarks.cpp (1)

305-322: LGTM! Well-structured benchmark addition.

The new benchmark section for the concat() operator is well-implemented:

  • Follows the established pattern of other benchmarks in the file
  • Correctly implements both RPP and RXCPP variants
  • Uses consistent naming and structure
  • Properly tests the concatenation of two immediate sources

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 300.16 ns 1.54 ns 1.54 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 316.42 ns 1.54 ns 1.54 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 681.08 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1029.19 ns 3.43 ns 3.43 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2231.93 ns 112.66 ns 97.16 ns 1.16
defer from array of 1 - defer + create + subscribe + immediate 727.01 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2111.66 ns 59.23 ns 59.23 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3022.83 ns 32.42 ns 32.69 ns 0.99
from array of 1 - create + as_blocking + subscribe + new_thread 29603.45 ns 27616.79 ns 28135.50 ns 0.98
from array of 1000 - create + as_blocking + subscribe + new_thread 37852.03 ns 51172.36 ns 52994.05 ns 0.97
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3535.50 ns 131.59 ns 119.38 ns 1.10

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1071.53 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 840.32 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 999.86 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 843.90 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1280.86 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 920.35 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1117.51 ns 17.91 ns 18.20 ns 0.98
immediate_just(1,2,3)+element_at(1)+subscribe 842.03 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 269.77 ns 0.62 ns 0.62 ns 1.00
current_thread scheduler create worker + schedule 361.17 ns 4.63 ns 4.63 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 809.98 ns 60.57 ns 62.63 ns 0.97

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 830.97 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 895.11 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2391.50 ns 140.62 ns 139.40 ns 1.01
immediate_just+buffer(2)+subscribe 1538.64 ns 13.58 ns 13.89 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2398.56 ns 1259.98 ns 1059.69 ns 1.19

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 834.28 ns - - 0.00
immediate_just+take_while(true)+subscribe 831.95 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1982.34 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3399.55 ns 151.96 ns 147.16 ns 1.03
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3641.67 ns 153.03 ns 155.91 ns 0.98
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 130.58 ns 145.01 ns 0.90
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3566.16 ns 1106.72 ns 899.35 ns 1.23
immediate_just(1) + zip(immediate_just(2)) + subscribe 2104.16 ns 220.29 ns 200.55 ns 1.10
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 3204.88 ns 1258.15 ns - 0.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.58 ns 14.61 ns 14.89 ns 0.98
subscribe 100 observers to publish_subject 197357.00 ns 16693.56 ns 15063.01 ns 1.11
100 on_next to 100 observers to publish_subject 27120.42 ns 20170.16 ns 17444.20 ns 1.16

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1369.30 ns 12.96 ns 12.96 ns 1.00
basic sample with immediate scheduler 1357.86 ns 5.55 ns 5.56 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 921.88 ns 0.31 ns 0.31 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2057.10 ns 995.03 ns 980.98 ns 1.01
create(on_error())+retry(1)+subscribe 628.18 ns 125.00 ns 100.55 ns 1.24

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1099.71 ns 0.93 ns 0.47 ns 1.97
Subscribe empty callbacks to empty observable via pipe operator 1147.35 ns 1.11 ns 0.47 ns 2.39

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 2063.07 ns 0.26 ns 0.23 ns 1.10
from array of 1 - create + subscribe + current_thread 2569.72 ns 37.02 ns 31.41 ns 1.18
concat_as_source of just(1 immediate) create + subscribe 5815.15 ns 314.15 ns 321.08 ns 0.98
defer from array of 1 - defer + create + subscribe + immediate 2175.97 ns 0.26 ns 0.23 ns 1.10
interval - interval + take(3) + subscribe + immediate 5321.25 ns 123.49 ns 114.03 ns 1.08
interval - interval + take(3) + subscribe + current_thread 6487.64 ns 105.52 ns 96.04 ns 1.10
from array of 1 - create + as_blocking + subscribe + new_thread 82632.57 ns 80059.14 ns 84282.46 ns 0.95
from array of 1000 - create + as_blocking + subscribe + new_thread 88556.62 ns 93696.27 ns 88033.64 ns 1.06
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 9010.35 ns 399.48 ns 363.52 ns 1.10

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 2987.52 ns 0.26 ns 0.23 ns 1.13
immediate_just+filter(true)+subscribe 2226.11 ns 0.25 ns 0.23 ns 1.10
immediate_just(1,2)+skip(1)+subscribe 2703.66 ns 0.23 ns 0.23 ns 0.99
immediate_just(1,1,2)+distinct_until_changed()+subscribe 2081.11 ns 0.47 ns 0.45 ns 1.05
immediate_just(1,2)+first()+subscribe 3156.29 ns 0.23 ns 0.22 ns 1.02
immediate_just(1,2)+last()+subscribe 2417.02 ns 0.23 ns 0.27 ns 0.85
immediate_just+take_last(1)+subscribe 3163.46 ns 0.25 ns 0.23 ns 1.10
immediate_just(1,2,3)+element_at(1)+subscribe 2144.60 ns 0.23 ns 0.23 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 948.18 ns 0.57 ns 0.93 ns 0.61
current_thread scheduler create worker + schedule 1304.17 ns 37.30 ns 31.75 ns 1.17
current_thread scheduler create worker + schedule + recursive schedule 2206.82 ns 222.97 ns 191.32 ns 1.17

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2156.05 ns 4.16 ns 4.52 ns 0.92
immediate_just+scan(10, std::plus)+subscribe 2518.50 ns 0.52 ns 0.45 ns 1.18
immediate_just+flat_map(immediate_just(v*2))+subscribe 5693.67 ns 410.53 ns 354.76 ns 1.16
immediate_just+buffer(2)+subscribe 2748.07 ns 72.07 ns 62.09 ns 1.16
immediate_just+window(2)+subscribe + subscsribe inner 5846.79 ns 2614.78 ns 2273.31 ns 1.15

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2264.47 ns - - 0.00
immediate_just+take_while(true)+subscribe 2219.74 ns 0.25 ns 0.22 ns 1.12

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 4887.40 ns 4.90 ns 4.90 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 7983.82 ns 451.32 ns 399.44 ns 1.13
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 8995.59 ns 447.13 ns 391.44 ns 1.14
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 494.64 ns 429.75 ns 1.15
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 8603.48 ns 2075.74 ns 1793.63 ns 1.16
immediate_just(1) + zip(immediate_just(2)) + subscribe 5644.40 ns 895.36 ns 787.12 ns 1.14
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 7894.94 ns 2420.81 ns - 0.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 74.72 ns 47.78 ns 49.29 ns 0.97
subscribe 100 observers to publish_subject 335984.67 ns 40660.89 ns 40601.04 ns 1.00
100 on_next to 100 observers to publish_subject 56806.89 ns 20583.23 ns 20842.39 ns 0.99

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 2742.45 ns 66.86 ns 69.35 ns 0.96
basic sample with immediate scheduler 2810.31 ns 19.06 ns 18.62 ns 1.02

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 2375.62 ns 0.23 ns 0.23 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 6623.20 ns 4045.34 ns 4040.79 ns 1.00
create(on_error())+retry(1)+subscribe 1811.24 ns 280.74 ns 278.92 ns 1.01

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 268.08 ns 0.63 ns 0.63 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 268.88 ns 0.63 ns 0.63 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 579.00 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 789.47 ns 4.01 ns 4.01 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2365.38 ns 128.60 ns 128.35 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 779.37 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2235.29 ns 58.36 ns 58.27 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3239.13 ns 30.86 ns 30.86 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 30636.59 ns 27912.13 ns 27950.18 ns 1.00
from array of 1000 - create + as_blocking + subscribe + new_thread 40456.96 ns 33767.58 ns 33562.10 ns 1.01
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3691.03 ns 147.41 ns 146.99 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1156.87 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 851.15 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 1078.39 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 893.74 ns 0.62 ns 0.62 ns 1.00
immediate_just(1,2)+first()+subscribe 1369.94 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 1005.03 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1214.17 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2,3)+element_at(1)+subscribe 879.17 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 284.54 ns 1.54 ns 1.54 ns 1.00
current_thread scheduler create worker + schedule 397.06 ns 4.32 ns 4.01 ns 1.08
current_thread scheduler create worker + schedule + recursive schedule 854.25 ns 54.07 ns 62.34 ns 0.87

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 856.44 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 962.13 ns 0.31 ns 0.33 ns 0.93
immediate_just+flat_map(immediate_just(v*2))+subscribe 2243.28 ns 142.35 ns 140.77 ns 1.01
immediate_just+buffer(2)+subscribe 1524.18 ns 13.90 ns 13.58 ns 1.02
immediate_just+window(2)+subscribe + subscsribe inner 2503.74 ns 923.31 ns 919.72 ns 1.00

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 868.40 ns - - 0.00
immediate_just+take_while(true)+subscribe 856.98 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 1987.77 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3252.93 ns 156.33 ns 157.27 ns 0.99
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3732.18 ns 139.42 ns 139.84 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 139.93 ns 142.92 ns 0.98
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3337.08 ns 835.23 ns 843.39 ns 0.99
immediate_just(1) + zip(immediate_just(2)) + subscribe 2328.50 ns 209.85 ns 198.43 ns 1.06
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 3245.58 ns 959.38 ns - 0.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 52.29 ns 17.49 ns 17.72 ns 0.99
subscribe 100 observers to publish_subject 204059.50 ns 16018.03 ns 16152.61 ns 0.99
100 on_next to 100 observers to publish_subject 40616.86 ns 20614.20 ns 23500.52 ns 0.88

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1300.20 ns 12.04 ns 11.42 ns 1.05
basic sample with immediate scheduler 1304.76 ns 5.86 ns 5.86 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 996.37 ns 0.31 ns 0.31 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2151.11 ns 1159.11 ns 1162.25 ns 1.00
create(on_error())+retry(1)+subscribe 645.65 ns 140.06 ns 140.31 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 568.17 ns 1.85 ns 2.16 ns 0.86
Subscribe empty callbacks to empty observable via pipe operator 582.35 ns 1.85 ns 2.16 ns 0.86

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1178.89 ns 5.24 ns 5.24 ns 1.00
from array of 1 - create + subscribe + current_thread 1421.57 ns 15.44 ns 15.45 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 3777.11 ns 172.04 ns 176.09 ns 0.98
defer from array of 1 - defer + create + subscribe + immediate 1204.74 ns 5.24 ns 5.24 ns 1.00
interval - interval + take(3) + subscribe + immediate 3395.98 ns 140.83 ns 140.70 ns 1.00
interval - interval + take(3) + subscribe + current_thread 3396.14 ns 60.93 ns 59.80 ns 1.02
from array of 1 - create + as_blocking + subscribe + new_thread 118788.89 ns 112463.64 ns 112690.00 ns 1.00
from array of 1000 - create + as_blocking + subscribe + new_thread 128912.50 ns 129922.22 ns 130455.56 ns 1.00
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 5364.02 ns 207.69 ns 211.32 ns 0.98

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1857.36 ns 19.73 ns 19.74 ns 1.00
immediate_just+filter(true)+subscribe 1646.67 ns 18.81 ns 18.86 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 2088.27 ns 19.09 ns 18.52 ns 1.03
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1357.81 ns 24.48 ns 23.46 ns 1.04
immediate_just(1,2)+first()+subscribe 2373.39 ns 17.28 ns 17.76 ns 0.97
immediate_just(1,2)+last()+subscribe 1870.69 ns 18.51 ns 18.56 ns 1.00
immediate_just+take_last(1)+subscribe 2069.35 ns 63.31 ns 65.26 ns 0.97
immediate_just(1,2,3)+element_at(1)+subscribe 1627.96 ns 21.91 ns 21.92 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 482.39 ns 4.32 ns 4.32 ns 1.00
current_thread scheduler create worker + schedule 657.73 ns 11.70 ns 11.43 ns 1.02
current_thread scheduler create worker + schedule + recursive schedule 1342.31 ns 101.55 ns 99.22 ns 1.02

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1369.06 ns 18.81 ns 18.81 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1438.67 ns 20.96 ns 20.96 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 3981.12 ns 184.00 ns 186.55 ns 0.99
immediate_just+buffer(2)+subscribe 2396.50 ns 64.16 ns 65.08 ns 0.99
immediate_just+window(2)+subscribe + subscsribe inner 4080.50 ns 1352.77 ns 1303.97 ns 1.04

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1342.37 ns 17.57 ns 17.58 ns 1.00
immediate_just+take_while(true)+subscribe 1346.90 ns 18.81 ns 18.82 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3144.01 ns 11.10 ns 11.11 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 5159.30 ns 199.85 ns 205.94 ns 0.97
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 5721.59 ns 182.83 ns 198.84 ns 0.92
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 192.60 ns 200.26 ns 0.96
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 6189.78 ns 944.04 ns 952.33 ns 0.99
immediate_just(1) + zip(immediate_just(2)) + subscribe 3847.73 ns 515.52 ns 515.65 ns 1.00
immediate_just(immediate_just(1), immediate_just(1)) + concat() + subscribe 4884.09 ns 1172.36 ns - 0.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 37.19 ns 20.04 ns 19.58 ns 1.02
subscribe 100 observers to publish_subject 268625.00 ns 30288.57 ns 27532.50 ns 1.10
100 on_next to 100 observers to publish_subject 52195.45 ns 35741.38 ns 32609.68 ns 1.10

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1899.64 ns 96.20 ns 95.34 ns 1.01
basic sample with immediate scheduler 1901.86 ns 69.36 ns 68.44 ns 1.01

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1459.86 ns 19.42 ns 19.43 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 1904.42 ns 360.85 ns 364.29 ns 0.99
create(on_error())+retry(1)+subscribe 1186.69 ns 136.80 ns 146.05 ns 0.94

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2024

Copy link
Copy Markdown

@AlexInLog AlexInLog marked this pull request as ready for review November 6, 2024 20:53
@AlexInLog AlexInLog merged commit 9aa557c into v2 Nov 6, 2024
@AlexInLog AlexInLog deleted the benchmarks branch November 6, 2024 20:53
@coderabbitai coderabbitai Bot mentioned this pull request Nov 22, 2024
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