Skip to content

Commit

Permalink
Split lift (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino authored Oct 13, 2022
1 parent b8e1715 commit bd0d211
Show file tree
Hide file tree
Showing 61 changed files with 361 additions and 368 deletions.
16 changes: 10 additions & 6 deletions src/benchmarks/rpp_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,20 +1083,24 @@ TEST_CASE("on_error_resume_next")
{
BENCHMARK_ADVANCED("on_error_resume_next construction from observable via dot + subscribe")(Catch::Benchmark::Chronometer meter)
{
const auto obs = rpp::observable::create<int>([](const auto& subscriber)
auto err = std::make_exception_ptr(std::runtime_error{""});
const auto obs = rpp::observable::create<int>([&err](const auto& subscriber)
{
subscriber.on_error(std::make_exception_ptr(std::runtime_error{""}));
subscriber.on_error(err);
});
auto subscriber = rpp::specific_subscriber{[](const int&) {}};

meter.measure([&]
std::vector<rpp::dynamic_subscriber<int>> subs{};
for (int i = 0; i < meter.runs(); ++i)
subs.push_back(rpp::dynamic_subscriber<int>{});

meter.measure([&](int i)
{
return obs
.on_error_resume_next([](auto&&)
{
return rpp::observable::just(1);
return rpp::observable::never<int>();
})
.subscribe(subscriber);
.subscribe(subs[i]);
});
};
}
16 changes: 10 additions & 6 deletions src/benchmarks/rxcpp_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,20 +1049,24 @@ TEST_CASE("on_error_resume_next")
{
BENCHMARK_ADVANCED("on_error_resume_next construction from observable via dot + subscribe")(Catch::Benchmark::Chronometer meter)
{
const auto obs = rxcpp::sources::create<int>([](const auto& subscriber)
auto err = std::make_exception_ptr(std::runtime_error{""});
const auto obs = rxcpp::sources::create<int>([&err](const auto& subscriber)
{
subscriber.on_error(std::make_exception_ptr(std::runtime_error{""}));
subscriber.on_error(err);
});
auto subscriber = rxcpp::make_subscriber<int>();

meter.measure([&](int)
std::vector<rxcpp::subscriber<int>> subs{};
for (int i = 0; i < meter.runs(); ++i)
subs.push_back(rxcpp::make_subscriber<int>());

meter.measure([&](int i)
{
return obs
.on_error_resume_next([](auto&&)
{
return rxcpp::observable<>::just(1);
return rxcpp::observable<>::never<int>();
})
.subscribe(subscriber);
.subscribe(subs[i]);
});
};
}
2 changes: 1 addition & 1 deletion src/rpp/rpp/observables/details/member_overload.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

namespace rpp::details
{
template<rpp::constraint::decayed_type Type, typename SpecificObservable, typename MemberTag>
template<constraint::decayed_type Type, typename SpecificObservable, typename MemberTag>
struct member_overload;
} // namespace rpp::details
8 changes: 3 additions & 5 deletions src/rpp/rpp/observables/interface_observable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@

#pragma once

#include <rpp/defs.hpp> // RPP_EMPTY_BASES
#include <rpp/observables/blocking_observable.hpp> // as_blocking
#include <rpp/observables/constraints.hpp> // own constraints
#include <rpp/observables/fwd.hpp> // own forwarding
#include <rpp/operators/fwd.hpp> // forwarding of member_overaloads
#include <rpp/operators/lift.hpp> // must-have operators
#include <rpp/observables/blocking_observable.hpp> // as_blocking

#include <rpp/defs.hpp> // RPP_EMPTY_BASES
#include <rpp/utils/function_traits.hpp>
#include <rpp/utils/function_traits.hpp> // decayed_invoke_result_t

#include <type_traits>

Expand Down
3 changes: 3 additions & 0 deletions src/rpp/rpp/observers/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ template<constraint::decayed_type T,
constraint::on_error_fn OnError,
constraint::on_completed_fn OnCompleted>
class specific_observer;

template<typename...Args>
using specific_observer_with_decayed_args = rpp::specific_observer<std::decay_t<Args>...>;
} // namespace rpp
3 changes: 0 additions & 3 deletions src/rpp/rpp/observers/specific_observer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ specific_observer(OnNext, OnError, Args...) -> specific_observer<utils::decayed_
template<typename OnNext, constraint::on_completed_fn OnCompleted>
specific_observer(OnNext, OnCompleted) -> specific_observer<utils::decayed_function_argument_t<OnNext>, OnNext, utils::rethrow_error_t, OnCompleted>;

template<typename...Args>
using specific_observer_with_decayed_args = rpp::specific_observer<std::decay_t<Args>...>;

/**
* \brief Create specific_observer with manually specified Type. In case of type can be deduced from argument of OnNext use direct constructor of rpp::specific_observer
* \tparam Type manually specific type of observer
Expand Down
13 changes: 6 additions & 7 deletions src/rpp/rpp/operators/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@

#pragma once

#include <algorithm>

#include <rpp/operators/fwd/buffer.hpp>
#include <rpp/subscribers/constraints.hpp>
#include <rpp/sources/create.hpp>
#include <rpp/utils/functors.hpp>
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_dynamic_state
#include <rpp/operators/fwd/buffer.hpp> // own forwarding
#include <rpp/subscribers/constraints.hpp> // subscriber_of_type
#include <rpp/utils/functors.hpp> // forwarding_on_error

#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <algorithm>


IMPLEMENTATION_FILE(buffer_tag);
Expand Down
17 changes: 7 additions & 10 deletions src/rpp/rpp/operators/combine_latest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@

#pragma once

#include <algorithm>

#include <rpp/operators/fwd/combine_latest.hpp>
#include <rpp/subscribers/constraints.hpp>
#include <rpp/sources/create.hpp>
#include <rpp/utils/functors.hpp>
#include <rpp/operators/merge.hpp>
#include <rpp/defs.hpp>
#include <rpp/utils/spinlock.hpp>

#include <rpp/defs.hpp> // RPP_NO_UNIQUE_ADDRESS
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/merge.hpp> // merge_state
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <rpp/operators/fwd/combine_latest.hpp> // own forwarding
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber_of_type
#include <rpp/utils/spinlock.hpp> // spinlock

#include <algorithm>

IMPLEMENTATION_FILE(combine_latest_tag);

Expand Down
18 changes: 8 additions & 10 deletions src/rpp/rpp/operators/concat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,19 @@

#pragma once

#include <rpp/subscribers/constraints.hpp>
#include <rpp/operators/fwd/concat.hpp>
#include <rpp/operators/merge.hpp>
#include <rpp/observables/dynamic_observable.hpp>

#include <rpp/subscriptions/composite_subscription.hpp>
#include <rpp/observables/dynamic_observable.hpp> // dynamic_observable
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/merge.hpp> // merge_forwarding_on_next/merge_on_error
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state

#include <rpp/sources/just.hpp>
#include <rpp/operators/fwd/concat.hpp> // own forwarding
#include <rpp/sources/just.hpp>
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber_of_type
#include <rpp/subscriptions/composite_subscription.hpp> // composite_subscription
#include <rpp/utils/functors.hpp>
#include <rpp/utils/spinlock.hpp>


#include <mutex>
#include <memory>
#include <mutex>
#include <queue>


Expand Down
7 changes: 4 additions & 3 deletions src/rpp/rpp/operators/delay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

#pragma once

#include <rpp/defs.hpp>
#include <rpp/defs.hpp> // RPP_NO_UNIQUE_ADDRESS
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <rpp/operators/fwd/delay.hpp>
#include <rpp/subscribers/constraints.hpp>
#include <rpp/operators/fwd/delay.hpp> // own forwarding
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber_of_type

IMPLEMENTATION_FILE(delay_tag);

Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/operators/details/serialized_subscriber.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#pragma once

#include <rpp/subscribers/constraints.hpp>
#include <rpp/operators/details/subscriber_with_state.hpp>
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <rpp/subscriptions/composite_subscription.hpp>

#include <memory>
Expand Down
17 changes: 7 additions & 10 deletions src/rpp/rpp/operators/distinct_until_changed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@

#pragma once

#include <rpp/observables/constraints.hpp>
#include <rpp/subscribers/constraints.hpp>
#include <rpp/operators/fwd/distinct_until_changed.hpp>
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <rpp/utils/functors.hpp>
#include <rpp/defs.hpp> // RPP_NO_UNIQUE_ADDRESS
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_dynamic_state
#include <rpp/operators/fwd/distinct_until_changed.hpp> // own forwarding
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber_of_type
#include <rpp/utils/functors.hpp> // forwarding_on_error/forwarding_on_completed
#include <rpp/utils/utilities.hpp> // as_const

#include <rpp/defs.hpp>

#include <rpp/utils/utilities.hpp>

#include <memory>
#include <optional>


Expand Down
10 changes: 5 additions & 5 deletions src/rpp/rpp/operators/do.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

#pragma once

#include <rpp/subscribers/constraints.hpp>
#include <rpp/operators/fwd/do.hpp>

#include <rpp/utils/utilities.hpp>

#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/fwd/do.hpp> // own forwarding
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber_of_type
#include <rpp/utils/utilities.hpp> // utils::as_const

IMPLEMENTATION_FILE(do_tag);

Expand Down
11 changes: 5 additions & 6 deletions src/rpp/rpp/operators/filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@

#pragma once

#include <rpp/observables/constraints.hpp>
#include <rpp/operators/fwd/filter.hpp>
#include <rpp/subscribers/constraints.hpp>
#include <rpp/utils/utilities.hpp>

#include <rpp/defs.hpp>
#include <rpp/defs.hpp> // RPP_NO_UNIQUE_ADDRESS
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/fwd/filter.hpp> // own forwarding
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber_of_type
#include <rpp/utils/utilities.hpp> // utils::as_const

#include <utility>

Expand Down
15 changes: 7 additions & 8 deletions src/rpp/rpp/operators/first.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@

#pragma once

#include <rpp/operators/fwd/first.hpp>
#include <rpp/operators/take.hpp>
#include <rpp/subscribers/constraints.hpp>
#include <rpp/utils/exceptions.hpp>
#include <rpp/utils/functors.hpp>
#include <rpp/utils/utilities.hpp>

#include <memory>
#include <rpp/operators/lift.hpp> // required due to operator uses lift
#include <rpp/operators/take.hpp> // take_state
#include <rpp/operators/details/subscriber_with_state.hpp> // create_subscriber_with_state
#include <rpp/operators/fwd/first.hpp> // own forwarding
#include <rpp/subscribers/constraints.hpp> // constraint::subscriber
#include <rpp/utils/exceptions.hpp> // not_enough_emissions
#include <rpp/utils/functors.hpp> // forwarding_on_error

IMPLEMENTATION_FILE(first_tag);

Expand Down
3 changes: 1 addition & 2 deletions src/rpp/rpp/operators/flat_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

#pragma once

#include <rpp/operators/fwd/flat_map.hpp>

#include <rpp/operators/map.hpp>
#include <rpp/operators/merge.hpp>
#include <rpp/operators/fwd/flat_map.hpp>

IMPLEMENTATION_FILE(flat_map_tag);

Expand Down
1 change: 1 addition & 0 deletions src/rpp/rpp/operators/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <rpp/operators/fwd/flat_map.hpp>
#include <rpp/operators/fwd/group_by.hpp>
#include <rpp/operators/fwd/last.hpp>
#include <rpp/operators/fwd/lift.hpp>
#include <rpp/operators/fwd/map.hpp>
#include <rpp/operators/fwd/merge.hpp>
#include <rpp/operators/fwd/multicast.hpp>
Expand Down
5 changes: 2 additions & 3 deletions src/rpp/rpp/operators/fwd/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@

#pragma once

#include <vector>

#include <rpp/observables/constraints.hpp>
#include <rpp/observables/details/member_overload.hpp>

#include <vector>

namespace rpp::details
{
struct buffer_tag;
Expand Down
9 changes: 4 additions & 5 deletions src/rpp/rpp/operators/fwd/combine_latest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

#pragma once

#include <rpp/observables/details/member_overload.hpp>
#include <rpp/observables/constraints.hpp>
#include <rpp/utils/functors.hpp>
#include <rpp/utils/function_traits.hpp>

#include <rpp/observables/constraints.hpp> // constraint::observable
#include <rpp/observables/details/member_overload.hpp> // member_overload
#include <rpp/utils/function_traits.hpp> // decayed_invoke_result_t
#include <rpp/utils/functors.hpp> // pack_to_tuple

#include <tuple>

Expand Down
5 changes: 2 additions & 3 deletions src/rpp/rpp/operators/fwd/concat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

#pragma once

#include <rpp/observables/details/member_overload.hpp>

#include <rpp/observables/constraints.hpp>
#include <rpp/observables/constraints.hpp> // constraint::observable_of_type
#include <rpp/observables/details/member_overload.hpp> // member_overload


namespace rpp::details
Expand Down
7 changes: 2 additions & 5 deletions src/rpp/rpp/operators/fwd/delay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@

#pragma once

#include <rpp/schedulers/constraints.hpp>
#include <rpp/observables/details/member_overload.hpp>
#include <rpp/utils/function_traits.hpp>
#include <rpp/utils/functors.hpp>
#include <rpp/schedulers/constraints.hpp> // schedulers::constraint::scheduler
#include <rpp/observables/details/member_overload.hpp> // member_overload

namespace rpp::details
{
Expand All @@ -22,7 +20,6 @@ struct delay_tag;

namespace rpp::details
{

template<constraint::decayed_type Type, schedulers::constraint::scheduler TScheduler>
struct delay_impl;

Expand Down
2 changes: 1 addition & 1 deletion src/rpp/rpp/operators/fwd/distinct_until_changed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#pragma once

#include <rpp/observables/details/member_overload.hpp>
#include <rpp/observables/details/member_overload.hpp> // member_overload

#include <concepts>
#include <functional>
Expand Down
5 changes: 2 additions & 3 deletions src/rpp/rpp/operators/fwd/do.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

#pragma once

#include <rpp/observables/details/member_overload.hpp>
#include <rpp/observers/fwd.hpp>
#include <rpp/observers/specific_observer.hpp>
#include <rpp/observables/details/member_overload.hpp> // member_overload
#include <rpp/observers/constraints.hpp> // constraint::observer_of_type

namespace rpp::details
{
Expand Down
Loading

1 comment on commit bd0d211

@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.335032 1.00 0.34ns
Dynamic observable construction 29.15ns 29.1571 1.00 24.45ns
Specific observable construction + as_dynamic 31.60ns 29.1976 1.08 24.78ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 111.55ns 112.004 1.00 293.68ns
Specific observable lift dynamic observer 136.68ns 138.808 0.98 311.72ns
Dynamic observable lift specific observer 191.70ns 189.254 1.01 339.47ns
Dynamic observable lift dynamic observer 190.60ns 194.268 0.98 336.05ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 77.50ns 77.2746 1.00 303.28ns
Specific observable subscribe dynamic observer 88.13ns 87.9272 1.00 300.14ns
Dynamic observable subscribe specific observer 149.57ns 145.986 1.02 331.05ns
Dynamic observable subscribe dynamic observer 139.60ns 139.744 1.00 319.43ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 76.54ns 76.6028 1.00 292.85ns
Dynamic observable subscribe lambda 139.72ns 140.17 1.00 328.80ns
Specific observable subscribe lambda without subscription 76.41ns 76.2253 1.00 288.10ns
Dynamic observable subscribe lambda without subscription 140.22ns 142.442 0.98 326.75ns
Specific observable subscribe specific subscriber 43.12ns 43.2357 1.00 223.70ns
Dynamic observable subscribe specific subscriber 105.67ns 105.571 1.00 266.67ns
Specific observable subscribe dynamic observer 43.53ns 43.5293 1.00 239.16ns
Dynamic observable subscribe dynamic observer 94.15ns 93.9408 1.00 259.90ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.34ns 0.33509 1.00 0.34ns
Dynamic observer construction 29.17ns 29.1623 1.00 21.11ns
Specific observer construction + as_dynamic 29.14ns 29.1688 1.00 21.19ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.670233 1.00 0.67ns
Dynamic observer OnNext 2.01ns 2.00579 1.00 2.49ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 33.81ns 33.8065 1.00 64.57ns
Make copy of subscriber 16.71ns 16.7175 1.00 4.65ns
Transform subsriber to dynamic 45.88ns 46.1842 0.99 26.47ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 33.76ns 34.0425 0.99 51.80ns
composite_subscription add 49.06ns 47.652 1.03 81.68ns
composite_subscription unsubscribe 44.00ns 43.9478 1.00 24.34ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 265.60ns 266.687 1.00 1825.57ns
sending of values from observable via buffer to subscriber 6.36ns 6.36622 1.00 27.65ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 270.19ns 269.75 1.00 518.91ns
long stateful chain creation + subscribe 396.79ns 398.644 1.00 807.12ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 885.86ns 885.143 1.00 915.57ns
sending of values from observable via combine_latest to subscriber 27.77ns 27.8183 1.00 2.34ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 1899.06ns 1879.77 1.01 3267.48ns
concat_with 2223.57ns 2212.74 1.00 3713.31ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 127.43ns 127.699 1.00 246.97ns
sending of values from observable via distinct_until_changed to subscriber 3.01ns 2.9644 1.01 1.34ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 144.79ns 141.324 1.02 576.30ns
sending of values from observable via first to subscriber 0.67ns 0.670479 1.00 0.67ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 85.59ns 83.9836 1.02 625.40ns
error 134.56ns 135.628 0.99 765.97ns
never 46.90ns 47.022 1.00 251.79ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 98.70ns 98.6255 1.00 660.44ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 0.67ns 0.671073 1.00 116.05ns
re-schedule 10 times 9.39ns 9.39588 1.00 145.28ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 85.41ns 85.6545 1.00 627.34ns
just send variadic 117.42ns 116.244 1.01 758.19ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 182.91ns 185.87 0.98 357.12ns
sending of values from observable via last to subscriber 2.36ns 2.49505 0.94 1.68ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 88.93ns 89.2269 1.00 239.02ns
sending of values from observable via map to subscriber 1.01ns 1.00511 1.00 2.35ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 1848.53ns 1835.84 1.01 3281.48ns
merge_with 2155.78ns 2165.95 1.00 3573.98ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 453.51ns 450.605 1.01 2577.23ns
sending of values from observable via observe_on to subscriber 60.67ns 60.6517 1.00 198.99ns

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 440.04ns 17.0354 25.83 526.11ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 24.09ns 24.0719 1.00 10.48ns
on_error 0.51ns 0.505069 1.00 19.18ns
on_completed 0.51ns 0.506057 1.00 0.67ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 198.45ns 203.317 0.98 175.96ns
get_observable 29.08ns 29.1278 1.00 49.83ns
get_subscriber 60.57ns 60.0654 1.01 13.29ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 3942.13ns 3929.81 1.00 3069.38ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 125.25ns 124.64 1.00 295.82ns
sending of values from observable via scan to subscriber 1.67ns 1.67687 1.00 2.35ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 2.02ns 2.02017 1.00 .
mutex lock increment 18.05ns 18.0461 1.00 .
spin-lock increment 9.03ns 9.19224 0.98 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 118.45ns 118.843 1.00 468.33ns
sending of values from observable via skip to subscriber 1.68ns 1.69274 0.99 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 2224.45ns 2212.94 1.01 2824.62ns
sending of values from observable via switch_on_next to subscriber 576.67ns 565.534 1.02 643.21ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 184.41ns 188.9 0.98 485.50ns
sending of values from observable via take to subscriber 2.35ns 2.34459 1.00 2.72ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 228.93ns 229.204 1.00 526.19ns
sending of values from observable via take_last to subscriber 2.93ns 2.93484 1.00 3.50ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1051.86ns 1054.91 1.00 1178.99ns
sending of values from observable via take_until to subscriber 9.04ns 9.10066 0.99 1.79ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 11.71ns 12.4133 0.94 162.21ns
re-schedule 10 times 30.59ns 31.4235 0.97 194.02ns
recursively schedule 10 times 1382.76ns 1382.24 1.00 5480.97ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2023.73ns 2011.48 1.01 3153.48ns
sending of values from observable via window to subscriber 546.02ns 543.46 1.00 366.60ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1035.91ns 1032.69 1.00 1132.83ns
sending of values from observable via with_latest_from to subscriber 26.74ns 26.7825 1.00 3.01ns

ci-ubuntu-gcc

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 0.40ns 0.401305 1.00 0.40ns
Dynamic observable construction 29.05ns 28.7556 1.01 21.67ns
Specific observable construction + as_dynamic 29.68ns 29.528 1.01 21.73ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 118.80ns 116.691 1.02 341.64ns
Specific observable lift dynamic observer 147.29ns 146.343 1.01 346.48ns
Dynamic observable lift specific observer 216.75ns 202.625 1.07 380.22ns
Dynamic observable lift dynamic observer 217.28ns 218.067 1.00 360.71ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 80.84ns 79.9702 1.01 330.88ns
Specific observable subscribe dynamic observer 97.15ns 96.7937 1.00 333.96ns
Dynamic observable subscribe specific observer 150.05ns 148.715 1.01 365.24ns
Dynamic observable subscribe dynamic observer 153.24ns 151.386 1.01 347.44ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 79.09ns 79.7757 0.99 322.01ns
Dynamic observable subscribe lambda 150.12ns 149.262 1.01 372.57ns
Specific observable subscribe lambda without subscription 80.06ns 79.3638 1.01 322.62ns
Dynamic observable subscribe lambda without subscription 150.27ns 149.313 1.01 400.17ns
Specific observable subscribe specific subscriber 48.68ns 49.1522 0.99 272.08ns
Dynamic observable subscribe specific subscriber 117.72ns 117.47 1.00 312.97ns
Specific observable subscribe dynamic observer 49.20ns 49.0832 1.00 276.44ns
Dynamic observable subscribe dynamic observer 104.38ns 103.9 1.00 290.48ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 0.40ns 0.40213 1.00 0.40ns
Dynamic observer construction 29.67ns 30.1147 0.99 18.09ns
Specific observer construction + as_dynamic 28.70ns 28.8027 1.00 18.10ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.44ns 0.427083 1.03 0.43ns
Dynamic observer OnNext 2.00ns 1.60736 1.25 1.61ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 33.54ns 34.5462 0.97 55.81ns
Make copy of subscriber 22.93ns 16.0876 1.43 5.72ns
Transform subsriber to dynamic 50.32ns 45.4963 1.11 23.14ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 33.43ns 33.8019 0.99 51.39ns
composite_subscription add 51.58ns 51.3278 1.00 97.00ns
composite_subscription unsubscribe 43.32ns 43.325 1.00 21.28ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 258.19ns 256.79 1.01 2065.49ns
sending of values from observable via buffer to subscriber 6.44ns 6.25651 1.03 26.43ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 324.17ns 324.478 1.00 674.43ns
long stateful chain creation + subscribe 458.41ns 458.297 1.00 1091.16ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 973.59ns 974.184 1.00 1177.20ns
sending of values from observable via combine_latest to subscriber 34.15ns 34.1471 1.00 1.47ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 2055.40ns 2043.34 1.01 3927.36ns
concat_with 2417.07ns 2417.55 1.00 4739.98ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 139.88ns 141.034 0.99 353.96ns
sending of values from observable via distinct_until_changed to subscriber 4.02ns 2.80982 1.43 1.43ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 166.00ns 166.349 1.00 731.63ns
sending of values from observable via first to subscriber 0.80ns 0.804591 1.00 0.81ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 88.03ns 86.7819 1.01 783.26ns
error 137.27ns 137.11 1.00 864.63ns
never 48.43ns 47.5769 1.02 282.38ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 102.41ns 103.531 0.99 809.35ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.21ns 1.19704 1.01 125.51ns
re-schedule 10 times 20.11ns 19.9422 1.01 156.57ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 89.92ns 91.3789 0.98 860.23ns
just send variadic 112.52ns 113.196 0.99 843.71ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 200.50ns 202.611 0.99 435.47ns
sending of values from observable via last to subscriber 1.87ns 1.77715 1.05 1.27ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 116.70ns 108.079 1.08 357.29ns
sending of values from observable via map to subscriber 1.00ns 1.00263 1.00 1.99ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 2017.93ns 2003.41 1.01 4086.87ns
merge_with 2371.84ns 2394.17 0.99 4463.84ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 502.60ns 504.926 1.00 2691.31ns
sending of values from observable via observe_on to subscriber 66.80ns 67.165 0.99 235.06ns

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 473.02ns 16.4145 28.82 685.32ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 30.12ns 29.8775 1.01 10.21ns
on_error 1.21ns 1.21243 1.00 16.19ns
on_completed 0.81ns 0.809354 1.00 0.80ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 208.12ns 206.644 1.01 145.57ns
get_observable 30.50ns 33.3388 0.91 43.02ns
get_subscriber 63.51ns 63.9694 0.99 20.98ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 4381.99ns 4406.61 0.99 3186.68ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 141.46ns 136.542 1.04 385.71ns
sending of values from observable via scan to subscriber 3.22ns 2.41148 1.33 1.61ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 0.83ns 1.99104 0.41 .
mutex lock increment 22.49ns 22.5121 1.00 .
spin-lock increment 10.44ns 10.4442 1.00 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 134.67ns 133.317 1.01 538.79ns
sending of values from observable via skip to subscriber 3.21ns 2.81445 1.14 2.74ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 2484.00ns 2504.26 0.99 4540.97ns
sending of values from observable via switch_on_next to subscriber 627.34ns 628.578 1.00 1102.30ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 193.71ns 193.173 1.00 628.76ns
sending of values from observable via take to subscriber 4.02ns 3.65684 1.10 2.97ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 233.14ns 243.46 0.96 656.42ns
sending of values from observable via take_last to subscriber 3.65ns 3.36904 1.08 6.22ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1127.83ns 1151.16 0.98 1692.77ns
sending of values from observable via take_until to subscriber 10.84ns 10.8268 1.00 2.06ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 18.38ns 20.88 0.88 171.48ns
re-schedule 10 times 41.54ns 39.5922 1.05 212.63ns
recursively schedule 10 times 1422.62ns 1420.05 1.00 6281.19ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2245.38ns 2270.47 0.99 3345.99ns
sending of values from observable via window to subscriber 604.47ns 613.273 0.99 422.90ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 1133.21ns 1134.97 1.00 1470.94ns
sending of values from observable via with_latest_from to subscriber 30.50ns 30.5217 1.00 3.33ns

ci-windows

Observable construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable construction 1.50ns 1.91275 0.79 0.67ns
Dynamic observable construction 82.24ns 69.2514 1.19 123.39ns
Specific observable construction + as_dynamic 82.27ns 68.4023 1.20 122.91ns

Observable lift

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable lift specific observer 174.44ns 153.756 1.13 1823.73ns
Specific observable lift dynamic observer 202.90ns 183.773 1.10 1265.33ns
Dynamic observable lift specific observer 302.42ns 270.822 1.12 1395.58ns
Dynamic observable lift dynamic observer 260.33ns 246.804 1.05 1307.10ns

Observable subscribe

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe specific observer 138.02ns 119.507 1.15 1175.50ns
Specific observable subscribe dynamic observer 153.25ns 131.332 1.17 1279.45ns
Dynamic observable subscribe specific observer 256.57ns 219.927 1.17 1346.89ns
Dynamic observable subscribe dynamic observer 201.79ns 182.26 1.11 1244.19ns

Observable subscribe #2

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observable subscribe lambda 143.30ns 118.688 1.21 1171.77ns
Dynamic observable subscribe lambda 256.63ns 220.1 1.17 1346.11ns
Specific observable subscribe lambda without subscription 163.67ns 119.281 1.37 1172.36ns
Dynamic observable subscribe lambda without subscription 258.06ns 219.309 1.18 1385.15ns
Specific observable subscribe specific subscriber 49.19ns 44.0792 1.12 840.39ns
Dynamic observable subscribe specific subscriber 166.85ns 146.055 1.14 1023.60ns
Specific observable subscribe dynamic observer 52.21ns 47.1772 1.11 1014.30ns
Dynamic observable subscribe dynamic observer 101.09ns 97.3252 1.04 908.86ns

Observer construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer construction 1.50ns 1.94515 0.77 1.51ns
Dynamic observer construction 83.50ns 69.5552 1.20 111.62ns
Specific observer construction + as_dynamic 83.78ns 69.5347 1.20 112.06ns

OnNext

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Specific observer OnNext 0.67ns 0.779272 0.86 0.67ns
Dynamic observer OnNext 1.68ns 1.95443 0.86 2.34ns

Subscriber construction

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
Make subsriber 84.43ns 70.59 1.20 350.07ns
Make copy of subscriber 16.71ns 15.5659 1.07 31.77ns
Transform subsriber to dynamic 98.05ns 83.3589 1.18 150.22ns

Subscription

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
composite_subscription create 84.68ns 70.9038 1.19 342.97ns
composite_subscription add 68.93ns 68.2602 1.01 158.16ns
composite_subscription unsubscribe 62.50ns 57.6815 1.08 122.82ns

buffer

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
buffer 380.20ns 353.688 1.07 4452.50ns
sending of values from observable via buffer to subscriber 6.37ns 6.88746 0.93 145.75ns

chains creation test

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
long non-state chain creation + subscribe 283.04ns 302.779 0.93 1722.87ns
long stateful chain creation + subscribe 762.58ns 655.611 1.16 3178.38ns

combine_latest

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
combine_latest construction from observable via dot + subscribe 1621.73ns 1539.86 1.05 2989.88ns
sending of values from observable via combine_latest to subscriber 47.63ns 44.9756 1.06 4.75ns

concat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
concat 3853.33ns 2930.4 1.31 15219.00ns
concat_with 3727.62ns 3499.5 1.07 11680.70ns

distinct_until_changed

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
distinct_until_changed construction from observable via dot + subscribe 214.15ns 204.48 1.05 1033.23ns
sending of values from observable via distinct_until_changed to subscriber 3.68ns 3.12188 1.18 4.23ns

first

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
first construction from observable via dot + subscribe 148.50ns 150.81 0.98 2615.70ns
sending of values from observable via first to subscriber 2.40ns 2.30557 1.04 1.80ns

foundamental sources

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
empty 82.37ns 78.8527 1.04 2403.60ns
error 144.24ns 163.547 0.88 2486.20ns
never 52.65ns 45.4896 1.16 902.00ns

from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
from vector with int 157.63ns 134.675 1.17 2458.82ns

immediate scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 1.94ns 1.56187 1.24 411.14ns
re-schedule 10 times 98.23ns 126.416 0.78 439.41ns

just

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
just send int 88.75ns 83.7918 1.06 2406.09ns
just send variadic 128.78ns 121.2 1.06 2502.90ns

last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
last construction from observable via dot + subscribe 241.22ns 226.167 1.07 1438.18ns
sending of values from observable via last to subscriber 3.20ns 3.05808 1.05 3.75ns

map

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
map construction from observable via dot + subscribe 106.12ns 108.298 0.98 1000.23ns
sending of values from observable via map to subscriber 3.36ns 3.43621 0.98 7.78ns

merge

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
merge 3681.20ns 2766.2 1.33 11043.00ns
merge_with 3555.38ns 3272.38 1.09 11714.00ns

observe_on

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
observe_on construction from observable via dot + subscribe 637.11ns 603.973 1.05 5733.00ns
sending of values from observable via observe_on to subscriber 64.14ns 61.0512 1.05 792.06ns

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 668.11ns 24.1657 27.65 1809.31ns

publish_subject callbacks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
on_next 19.81ns 22.2873 0.89 32.87ns
on_error 3.05ns 2.75722 1.11 18.60ns
on_completed 3.05ns 2.81775 1.08 1.36ns

publish_subject routines

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
construct 380.80ns 320.707 1.19 590.21ns
get_observable 28.42ns 30.4768 0.93 164.81ns
get_subscriber 50.24ns 59.8209 0.84 94.03ns

repeat

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
repeat construction from observable via dot + subscribe 6865.00ns 5700.8 1.20 11198.00ns

scan

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
scan construction from observable via dot + subscribe 206.09ns 185.817 1.11 1255.57ns
sending of values from observable via scan to subscriber 5.73ns 5.17035 1.11 9.32ns

single-threaded locks

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no-lock increment 1.87ns 3.09574 0.60 .
mutex lock increment 25.92ns 23.205 1.12 .
spin-lock increment 9.04ns 10.1384 0.89 .

skip

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
skip construction from observable via dot + subscribe 196.36ns 183.474 1.07 1570.25ns
sending of values from observable via skip to subscriber 3.68ns 3.11717 1.18 4.10ns

switch_on_next

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
switch_on_next construction from observable via dot + subscribe 3538.57ns 4200.57 0.84 11993.70ns
sending of values from observable via switch_on_next to subscriber 854.57ns 813.933 1.05 3099.22ns

take

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take construction from observable via dot + subscribe 248.54ns 233.663 1.06 2140.08ns
sending of values from observable via take to subscriber 5.67ns 5.90842 0.96 5.75ns

take_last

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_last construction from observable via dot + subscribe 343.94ns 320.9 1.07 2420.64ns
sending of values from observable via take_last to subscriber 4.40ns 3.94821 1.11 20.43ns

take_until

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
take_until construction from observable via dot + subscribe 1734.56ns 1601.31 1.08 5188.00ns
sending of values from observable via take_until to subscriber 11.42ns 11.7247 0.97 6.50ns

trampoline scheduler

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
no any re-schedule 19.44ns 17.6796 1.10 615.05ns
re-schedule 10 times 120.99ns 139.607 0.87 645.20ns
recursively schedule 10 times 2668.80ns 2411.45 1.11 19266.00ns

window

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
window 2949.44ns 2886.11 1.02 9939.33ns
sending of values from observable via window to subscriber 832.13ns 816.7 1.02 1631.19ns

with_latest_from

Table
Test Name Current, ns Prev, ns Ratio RxCpp current, ns
with_latest_from construction from observable via dot + subscribe 2085.67ns 1805.17 1.16 3756.00ns
sending of values from observable via with_latest_from to subscriber 38.15ns 34.9052 1.09 7.39ns

Please sign in to comment.