Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid recursion #380

Merged
merged 27 commits into from
Jun 26, 2023
Merged

Avoid recursion #380

merged 27 commits into from
Jun 26, 2023

Conversation

victimsnino
Copy link
Owner

@victimsnino victimsnino commented Jun 20, 2023

Comparison on my machines:

Platform Version Config Tests Binary Size Sample Binary Size
mac v2 Debug 25935296 1646240
mac avoid_recursion Debug 24651896 1528960
mac v2 Release 3215776 172672
mac avoid_recursion Release 3194248 171880
ubuntu GCC v2 Debug 42290928 2557288
ubuntu GCC avoid_recursion Debug 39135464 2273240
ubuntu GCC v2 Release 3391296 160520
ubuntu GCC avoid_recursion Release 3391096 159224
msvc v2 Debug 6138kb(exe)+56540kb(pdb) 367kb(exe)+5244kb(pdb)
msvc avoid_recursion Debug 5984kb(exe)+53020kb(pdb) 356kb(exe)+4892kb(pdb)
msvc v2 Release 71kb(exe) 1432kb(exe)
msvc avoid_recursion Release 70kb(exe) 1434kb(exe)

objdump:

v2
Total lines: 5661
Longest line: 9680
    3c45:	e8 76 0b 00 00       	call   47c0 <
	rpp::operators::details::merge_with_t<
		rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::details::concat_strategy<
								std::array<
									rpp::observable<
										char
										, rpp::details::observables::dynamic_strategy<
											char
										> 
									>
									, 2ul
								> 
							> 
						>
						, char
						, rpp::operators::details::take_while_observer_strategy<
							main::{lambda(char)#1}
						>
						, main::{lambda(char)#1}
					> 
				>
				, char
				, rpp::operators::details::filter_observer_strategy<
					main::{lambda(char)#3}
				>
				, main::{lambda(char)#3}
			> 
		> 
	>::operator()<
		rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::operators::details::operator_observable_strategy<
								rpp::observable<
									char
									, rpp::details::concat_strategy<
										std::array<
											rpp::observable<
												char
												, rpp::details::observables::dynamic_strategy<
													char
												> 
											>
											, 2ul
										> 
									> 
								>
								, char
								, rpp::operators::details::take_while_observer_strategy<
									main::{lambda(char)#1}
								>
								, main::{lambda(char)#1}
							> 
						>
						, char
						, rpp::operators::details::filter_observer_strategy<
							std::_Not_fn<
								int (*)(int) noexcept
							> 
						>
						, std::_Not_fn<
							int (*)(int) noexcept
						> 
					> 
				>
				, char
				, rpp::operators::details::map_observer_strategy<
					main::{lambda(char)#2}
				>
				, main::{lambda(char)#2}
			> 
		> const&
	>(rpp::observable<
		char
		, rpp::operators::details::operator_observable_strategy<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::details::concat_strategy<
									std::array<
										rpp::observable<
											char
											, rpp::details::observables::dynamic_strategy<
												char
											> 
										>
										, 2ul
									> 
								> 
							>
							, char
							, rpp::operators::details::take_while_observer_strategy<
								main::{lambda(char)#1}
							>
							, main::{lambda(char)#1}
						> 
					>
					, char
					, rpp::operators::details::filter_observer_strategy<
						std::_Not_fn<
							int (*)(int) noexcept
						> 
					>
					, std::_Not_fn<
						int (*)(int) noexcept
					> 
				> 
			>
			, char
			, rpp::operators::details::map_observer_strategy<
				main::{lambda(char)#2}
			>
			, main::{lambda(char)#2}
		> 
	> const&) &&::{lambda(rpp::observable<
		char
		, rpp::operators::details::operator_observable_strategy<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::details::concat_strategy<
							std::array<
								rpp::observable<
									char
									, rpp::details::observables::dynamic_strategy<
										char
									> 
								>
								, 2ul
							> 
						> 
					>
					, char
					, rpp::operators::details::take_while_observer_strategy<
						main::{lambda(char)#1}
					>
					, main::{lambda(char)#1}
				> 
			>
			, char
			, rpp::operators::details::filter_observer_strategy<
				main::{lambda(char)#3}
			>
			, main::{lambda(char)#3}
		> 
	>&&)#1}&& std::forward<
		rpp::operators::details::merge_with_t<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::details::concat_strategy<
									std::array<
										rpp::observable<
											char
											, rpp::details::observables::dynamic_strategy<
												char
											> 
										>
										, 2ul
									> 
								> 
							>
							, char
							, rpp::operators::details::take_while_observer_strategy<
								main::{lambda(char)#1}
							>
							, main::{lambda(char)#1}
						> 
					>
					, char
					, rpp::operators::details::filter_observer_strategy<
						main::{lambda(char)#3}
					>
					, main::{lambda(char)#3}
				> 
			> 
		>::operator()<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::operators::details::operator_observable_strategy<
									rpp::observable<
										char
										, rpp::details::concat_strategy<
											std::array<
												rpp::observable<
													char
													, rpp::details::observables::dynamic_strategy<
														char
													> 
												>
												, 2ul
											> 
										> 
									>
									, char
									, rpp::operators::details::take_while_observer_strategy<
										main::{lambda(char)#1}
									>
									, main::{lambda(char)#1}
								> 
							>
							, char
							, rpp::operators::details::filter_observer_strategy<
								std::_Not_fn<
									int (*)(int) noexcept
								> 
							>
							, std::_Not_fn<
								int (*)(int) noexcept
							> 
						> 
					>
					, char
					, rpp::operators::details::map_observer_strategy<
						main::{lambda(char)#2}
					>
					, main::{lambda(char)#2}
				> 
			> const&
		>(rpp::operators::details::merge_with_t<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::details::concat_strategy<
									std::array<
										rpp::observable<
											char
											, rpp::details::observables::dynamic_strategy<
												char
											> 
										>
										, 2ul
									> 
								> 
							>
							, char
							, rpp::operators::details::take_while_observer_strategy<
								main::{lambda(char)#1}
							>
							, main::{lambda(char)#1}
						> 
					>
					, char
					, rpp::operators::details::filter_observer_strategy<
						main::{lambda(char)#3}
					>
					, main::{lambda(char)#3}
				> 
			> 
		>::operator()<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::operators::details::operator_observable_strategy<
									rpp::observable<
										char
										, rpp::details::concat_strategy<
											std::array<
												rpp::observable<
													char
													, rpp::details::observables::dynamic_strategy<
														char
													> 
												>
												, 2ul
											> 
										> 
									>
									, char
									, rpp::operators::details::take_while_observer_strategy<
										main::{lambda(char)#1}
									>
									, main::{lambda(char)#1}
								> 
							>
							, char
							, rpp::operators::details::filter_observer_strategy<
								std::_Not_fn<
									int (*)(int) noexcept
								> 
							>
							, std::_Not_fn<
								int (*)(int) noexcept
							> 
						> 
					>
					, char
					, rpp::operators::details::map_observer_strategy<
						main::{lambda(char)#2}
					>
					, main::{lambda(char)#2}
				> 
			> const&
		>(rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::operators::details::operator_observable_strategy<
								rpp::observable<
									char
									, rpp::details::concat_strategy<
										std::array<
											rpp::observable<
												char
												, rpp::details::observables::dynamic_strategy<
													char
												> 
											>
											, 2ul
										> 
									> 
								>
								, char
								, rpp::operators::details::take_while_observer_strategy<
									main::{lambda(char)#1}
								>
								, main::{lambda(char)#1}
							> 
						>
						, char
						, rpp::operators::details::filter_observer_strategy<
							std::_Not_fn<
								int (*)(int) noexcept
							> 
						>
						, std::_Not_fn<
							int (*)(int) noexcept
						> 
					> 
				>
				, char
				, rpp::operators::details::map_observer_strategy<
					main::{lambda(char)#2}
				>
				, main::{lambda(char)#2}
			> 
		> const&) &&::{lambda(rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::details::concat_strategy<
								std::array<
									rpp::observable<
										char
										, rpp::details::observables::dynamic_strategy<
											char
										> 
									>
									, 2ul
								> 
							> 
						>
						, char
						, rpp::operators::details::take_while_observer_strategy<
							main::{lambda(char)#1}
						>
						, main::{lambda(char)#1}
					> 
				>
				, char
				, rpp::operators::details::filter_observer_strategy<
					main::{lambda(char)#3}
				>
				, main::{lambda(char)#3}
			> 
		>&&)#1}&&) &&::{lambda(rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::details::concat_strategy<
								std::array<
									rpp::observable<
										char
										, rpp::details::observables::dynamic_strategy<
											char
										> 
									>
									, 2ul
								> 
							> 
						>
						, char
						, rpp::operators::details::take_while_observer_strategy<
							main::{lambda(char)#1}
						>
						, main::{lambda(char)#1}
					> 
				>
				, char
				, rpp::operators::details::filter_observer_strategy<
					main::{lambda(char)#3}
				>
				, main::{lambda(char)#3}
			> 
		>&&)#1}
	>(std::remove_reference<
		rpp::operators::details::merge_with_t<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::details::concat_strategy<
									std::array<
										rpp::observable<
											char
											, rpp::details::observables::dynamic_strategy<
												char
											> 
										>
										, 2ul
									> 
								> 
							>
							, char
							, rpp::operators::details::take_while_observer_strategy<
								main::{lambda(char)#1}
							>
							, main::{lambda(char)#1}
						> 
					>
					, char
					, rpp::operators::details::filter_observer_strategy<
						main::{lambda(char)#3}
					>
					, main::{lambda(char)#3}
				> 
			> 
		>::operator()<
			rpp::observable<
				char
				, rpp::operators::details::operator_observable_strategy<
					rpp::observable<
						char
						, rpp::operators::details::operator_observable_strategy<
							rpp::observable<
								char
								, rpp::operators::details::operator_observable_strategy<
									rpp::observable<
										char
										, rpp::details::concat_strategy<
											std::array<
												rpp::observable<
													char
													, rpp::details::observables::dynamic_strategy<
														char
													> 
												>
												, 2ul
											> 
										> 
									>
									, char
									, rpp::operators::details::take_while_observer_strategy<
										main::{lambda(char)#1}
									>
									, main::{lambda(char)#1}
								> 
							>
							, char
							, rpp::operators::details::filter_observer_strategy<
								std::_Not_fn<
									int (*)(int) noexcept
								> 
							>
							, std::_Not_fn<
								int (*)(int) noexcept
							> 
						> 
					>
					, char
					, rpp::operators::details::map_observer_strategy<
						main::{lambda(char)#2}
					>
					, main::{lambda(char)#2}
				> 
			> const&
		>(rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::operators::details::operator_observable_strategy<
								rpp::observable<
									char
									, rpp::details::concat_strategy<
										std::array<
											rpp::observable<
												char
												, rpp::details::observables::dynamic_strategy<
													char
												> 
											>
											, 2ul
										> 
									> 
								>
								, char
								, rpp::operators::details::take_while_observer_strategy<
									main::{lambda(char)#1}
								>
								, main::{lambda(char)#1}
							> 
						>
						, char
						, rpp::operators::details::filter_observer_strategy<
							std::_Not_fn<
								int (*)(int) noexcept
							> 
						>
						, std::_Not_fn<
							int (*)(int) noexcept
						> 
					> 
				>
				, char
				, rpp::operators::details::map_observer_strategy<
					main::{lambda(char)#2}
				>
				, main::{lambda(char)#2}
			> 
		> const&) &&::{lambda(rpp::observable<
			char
			, rpp::operators::details::operator_observable_strategy<
				rpp::observable<
					char
					, rpp::operators::details::operator_observable_strategy<
						rpp::observable<
							char
							, rpp::details::concat_strategy<
								std::array<
									rpp::observable<
										char
										, rpp::details::observables::dynamic_strategy<
											char
										> 
									>
									, 2ul
								> 
							> 
						>
						, char
						, rpp::operators::details::take_while_observer_strategy<
							main::{lambda(char)#1}
						>
						, main::{lambda(char)#1}
					> 
				>
				, char
				, rpp::operators::details::filter_observer_strategy<
					main::{lambda(char)#3}
				>
				, main::{lambda(char)#3}
			> 
		>&&)#1}
	>::type&)
>

avoid_recursion
Total lines: 5414
Longest line: 5746
    d39b:	e8 fd 0d 00 00       	call   e19d <
	std::__allocated_ptr<
		std::allocator<
			std::_Sp_counted_ptr_inplace<
				rpp::observer<
					char
					, rpp::operators::details::operator_strategy_base<
						char
						, rpp::observer<
							char
							, rpp::operators::details::operator_strategy_base<
								char
								, rpp::observer<
									char
									, rpp::operators::details::operator_strategy_base<
										char
										, rpp::observer<
											char
											, rpp::operators::details::operator_strategy_base<
												char
												, rpp::observer<
													char
													, rpp::operators::details::operator_strategy_base<
														char
														, rpp::observer<
															char
															, rpp::details::observers::dynamic_strategy<
																char
															> 
														>
														, rpp::operators::details::merge_observer_inner_strategy
													> 
												>
												, rpp::operators::details::map_observer_strategy<
													main::{lambda(char)#2}
												> 
											> 
										>
										, rpp::operators::details::filter_observer_strategy<
											std::_Not_fn<
												int (*)(int) noexcept
											> 
										> 
									> 
								>
								, rpp::operators::details::take_while_observer_strategy<
									main::{lambda(char)#1}
								> 
							> 
						>
						, rpp::details::concat_source_observer_strategy<
							std::array<
								rpp::observable<
									char
									, rpp::details::observables::dynamic_strategy<
										char
									> 
								>
								, 2ul
							> 
						> 
					> 
				>
				, std::allocator<
					rpp::observer<
						char
						, rpp::operators::details::operator_strategy_base<
							char
							, rpp::observer<
								char
								, rpp::operators::details::operator_strategy_base<
									char
									, rpp::observer<
										char
										, rpp::operators::details::operator_strategy_base<
											char
											, rpp::observer<
												char
												, rpp::operators::details::operator_strategy_base<
													char
													, rpp::observer<
														char
														, rpp::operators::details::operator_strategy_base<
															char
															, rpp::observer<
																char
																, rpp::details::observers::dynamic_strategy<
																	char
																> 
															>
															, rpp::operators::details::merge_observer_inner_strategy
														> 
													>
													, rpp::operators::details::map_observer_strategy<
														main::{lambda(char)#2}
													> 
												> 
											>
											, rpp::operators::details::filter_observer_strategy<
												std::_Not_fn<
													int (*)(int) noexcept
												> 
											> 
										> 
									>
									, rpp::operators::details::take_while_observer_strategy<
										main::{lambda(char)#1}
									> 
								> 
							>
							, rpp::details::concat_source_observer_strategy<
								std::array<
									rpp::observable<
										char
										, rpp::details::observables::dynamic_strategy<
											char
										> 
									>
									, 2ul
								> 
							> 
						> 
					> 
				>
				, (__gnu_cxx::_Lock_policy)2
			> 
		> 
	> std::__allocate_guarded<
		std::allocator<
			std::_Sp_counted_ptr_inplace<
				rpp::observer<
					char
					, rpp::operators::details::operator_strategy_base<
						char
						, rpp::observer<
							char
							, rpp::operators::details::operator_strategy_base<
								char
								, rpp::observer<
									char
									, rpp::operators::details::operator_strategy_base<
										char
										, rpp::observer<
											char
											, rpp::operators::details::operator_strategy_base<
												char
												, rpp::observer<
													char
													, rpp::operators::details::operator_strategy_base<
														char
														, rpp::observer<
															char
															, rpp::details::observers::dynamic_strategy<
																char
															> 
														>
														, rpp::operators::details::merge_observer_inner_strategy
													> 
												>
												, rpp::operators::details::map_observer_strategy<
													main::{lambda(char)#2}
												> 
											> 
										>
										, rpp::operators::details::filter_observer_strategy<
											std::_Not_fn<
												int (*)(int) noexcept
											> 
										> 
									> 
								>
								, rpp::operators::details::take_while_observer_strategy<
									main::{lambda(char)#1}
								> 
							> 
						>
						, rpp::details::concat_source_observer_strategy<
							std::array<
								rpp::observable<
									char
									, rpp::details::observables::dynamic_strategy<
										char
									> 
								>
								, 2ul
							> 
						> 
					> 
				>
				, std::allocator<
					rpp::observer<
						char
						, rpp::operators::details::operator_strategy_base<
							char
							, rpp::observer<
								char
								, rpp::operators::details::operator_strategy_base<
									char
									, rpp::observer<
										char
										, rpp::operators::details::operator_strategy_base<
											char
											, rpp::observer<
												char
												, rpp::operators::details::operator_strategy_base<
													char
													, rpp::observer<
														char
														, rpp::operators::details::operator_strategy_base<
															char
															, rpp::observer<
																char
																, rpp::details::observers::dynamic_strategy<
																	char
																> 
															>
															, rpp::operators::details::merge_observer_inner_strategy
														> 
													>
													, rpp::operators::details::map_observer_strategy<
														main::{lambda(char)#2}
													> 
												> 
											>
											, rpp::operators::details::filter_observer_strategy<
												std::_Not_fn<
													int (*)(int) noexcept
												> 
											> 
										> 
									>
									, rpp::operators::details::take_while_observer_strategy<
										main::{lambda(char)#1}
									> 
								> 
							>
							, rpp::details::concat_source_observer_strategy<
								std::array<
									rpp::observable<
										char
										, rpp::details::observables::dynamic_strategy<
											char
										> 
									>
									, 2ul
								> 
							> 
						> 
					> 
				>
				, (__gnu_cxx::_Lock_policy)2
			> 
		> 
	>(std::allocator<
		std::_Sp_counted_ptr_inplace<
			rpp::observer<
				char
				, rpp::operators::details::operator_strategy_base<
					char
					, rpp::observer<
						char
						, rpp::operators::details::operator_strategy_base<
							char
							, rpp::observer<
								char
								, rpp::operators::details::operator_strategy_base<
									char
									, rpp::observer<
										char
										, rpp::operators::details::operator_strategy_base<
											char
											, rpp::observer<
												char
												, rpp::operators::details::operator_strategy_base<
													char
													, rpp::observer<
														char
														, rpp::details::observers::dynamic_strategy<
															char
														> 
													>
													, rpp::operators::details::merge_observer_inner_strategy
												> 
											>
											, rpp::operators::details::map_observer_strategy<
												main::{lambda(char)#2}
											> 
										> 
									>
									, rpp::operators::details::filter_observer_strategy<
										std::_Not_fn<
											int (*)(int) noexcept
										> 
									> 
								> 
							>
							, rpp::operators::details::take_while_observer_strategy<
								main::{lambda(char)#1}
							> 
						> 
					>
					, rpp::details::concat_source_observer_strategy<
						std::array<
							rpp::observable<
								char
								, rpp::details::observables::dynamic_strategy<
									char
								> 
							>
							, 2ul
						> 
					> 
				> 
			>
			, std::allocator<
				rpp::observer<
					char
					, rpp::operators::details::operator_strategy_base<
						char
						, rpp::observer<
							char
							, rpp::operators::details::operator_strategy_base<
								char
								, rpp::observer<
									char
									, rpp::operators::details::operator_strategy_base<
										char
										, rpp::observer<
											char
											, rpp::operators::details::operator_strategy_base<
												char
												, rpp::observer<
													char
													, rpp::operators::details::operator_strategy_base<
														char
														, rpp::observer<
															char
															, rpp::details::observers::dynamic_strategy<
																char
															> 
														>
														, rpp::operators::details::merge_observer_inner_strategy
													> 
												>
												, rpp::operators::details::map_observer_strategy<
													main::{lambda(char)#2}
												> 
											> 
										>
										, rpp::operators::details::filter_observer_strategy<
											std::_Not_fn<
												int (*)(int) noexcept
											> 
										> 
									> 
								>
								, rpp::operators::details::take_while_observer_strategy<
									main::{lambda(char)#1}
								> 
							> 
						>
						, rpp::details::concat_source_observer_strategy<
							std::array<
								rpp::observable<
									char
									, rpp::details::observables::dynamic_strategy<
										char
									> 
								>
								, 2ul
							> 
						> 
					> 
				> 
			>
			, (__gnu_cxx::_Lock_policy)2
		> 
	>&)
>

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2023

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 704.46 ns 0.67 ns 0.74 ns 0.90
Subscribe empty callbacks to empty observable via pipe operator 705.26 ns 0.67 ns 0.67 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1810.89 ns 0.33 ns 0.33 ns 1.00
from array of 1 - create + subscribe + current_thread 2641.08 ns 6.03 ns 6.02 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 5532.54 ns 0.33 ns 0.33 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 731.42 ns 0.67 ns 0.67 ns 1.00
current_thread scheduler create worker + schedule 889.45 ns 5.37 ns 5.37 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1986.42 ns 80.49 ns 81.22 ns 0.99

Combining Operators

name rxcpp rpp prev rpp ratio
create(create(1), create(1)) + merge() + subscribe 4470.94 ns 215.24 ns 215.23 ns 1.00
create(1) + merge_with(create(2)) + subscribe 7027.41 ns 219.86 ns 216.41 ns 1.02

Conditional Operators

name rxcpp rpp prev rpp ratio
create+take_while(false)+subscribe 896.24 ns - - 0.00
create+take_while(true)+subscribe 855.23 ns 0.33 ns 0.33 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
create+map(v*2)+subscribe 850.01 ns 0.33 ns 0.33 ns 1.00
create+scan(10, std::plus)+subscribe 1015.82 ns 0.33 ns 0.33 ns 1.00
create+flat_map(just(v*2))+subscribe 3262.92 ns 171.98 ns 171.19 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
create+take(1)+subscribe 1437.14 ns 0.33 ns 0.33 ns 1.00
create+filter(true)+subscribe 850.20 ns 0.33 ns 0.33 ns 1.00
create(1,2)+skip(1)+subscribe 1229.54 ns 0.33 ns 0.33 ns 1.00
create(1,1,2)+distinct_until_changed()+subscribe 860.38 ns 0.33 ns 0.33 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
create(1)+subscribe_on(immediate)+subscribe 3139.59 ns 0.33 ns 0.33 ns 1.00

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1120.07 ns 0.56 ns 0.59 ns 0.94
Subscribe empty callbacks to empty observable via pipe operator 1106.12 ns 0.56 ns 0.57 ns 0.98

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 2402.42 ns 0.45 ns 0.47 ns 0.95
from array of 1 - create + subscribe + current_thread 2883.03 ns 8.14 ns 9.08 ns 0.90
concat_as_source of just(1 immediate) create + subscribe 6854.28 ns 0.28 ns 0.30 ns 0.92

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 1022.96 ns 0.56 ns 0.57 ns 0.98
current_thread scheduler create worker + schedule 1279.66 ns 8.63 ns 9.97 ns 0.87
current_thread scheduler create worker + schedule + recursive schedule 2331.40 ns 151.03 ns 787.30 ns 0.19

Combining Operators

name rxcpp rpp prev rpp ratio
create(create(1), create(1)) + merge() + subscribe 3932.85 ns 363.29 ns 387.31 ns 0.94
create(1) + merge_with(create(2)) + subscribe 6672.06 ns 371.18 ns 378.60 ns 0.98

Conditional Operators

name rxcpp rpp prev rpp ratio
create+take_while(false)+subscribe 1177.41 ns - - 0.00
create+take_while(true)+subscribe 1130.29 ns 0.28 ns 0.28 ns 0.99

Transforming Operators

name rxcpp rpp prev rpp ratio
create+map(v*2)+subscribe 1117.59 ns 0.28 ns 0.28 ns 0.99
create+scan(10, std::plus)+subscribe 1393.97 ns 0.54 ns 0.56 ns 0.97
create+flat_map(just(v*2))+subscribe 3234.11 ns 344.79 ns 324.10 ns 1.06

Filtering Operators

name rxcpp rpp prev rpp ratio
create+take(1)+subscribe 1947.94 ns 0.27 ns 0.28 ns 0.96
create+filter(true)+subscribe 1109.80 ns 0.27 ns 0.28 ns 0.97
create(1,2)+skip(1)+subscribe 1780.75 ns 0.27 ns 0.29 ns 0.95
create(1,1,2)+distinct_until_changed()+subscribe 1122.20 ns 0.56 ns 0.56 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
create(1)+subscribe_on(immediate)+subscribe 3517.80 ns 0.27 ns 0.28 ns 0.97

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 333.64 ns 0.80 ns 0.80 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 341.01 ns 0.60 ns 1.21 ns 0.50

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 734.29 ns 0.41 ns 0.45 ns 0.91
from array of 1 - create + subscribe + current_thread 1053.48 ns 4.42 ns 5.32 ns 0.83
concat_as_source of just(1 immediate) create + subscribe 2525.28 ns 0.40 ns 0.40 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 258.28 ns 0.80 ns 1.20 ns 0.67
current_thread scheduler create worker + schedule 387.85 ns 4.05 ns 5.21 ns 0.78
current_thread scheduler create worker + schedule + recursive schedule 831.87 ns 67.13 ns 79.96 ns 0.84

Combining Operators

name rxcpp rpp prev rpp ratio
create(create(1), create(1)) + merge() + subscribe 2130.02 ns 107.69 ns 142.46 ns 0.76
create(1) + merge_with(create(2)) + subscribe 3402.93 ns 104.33 ns 134.00 ns 0.78

Conditional Operators

name rxcpp rpp prev rpp ratio
create+take_while(false)+subscribe 390.95 ns - - 0.00
create+take_while(true)+subscribe 363.48 ns 0.40 ns 0.40 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
create+map(v*2)+subscribe 368.45 ns 0.40 ns 0.40 ns 1.00
create+scan(10, std::plus)+subscribe 453.33 ns 0.40 ns 0.81 ns 0.50
create+flat_map(just(v*2))+subscribe 1637.10 ns 88.12 ns 115.90 ns 0.76

Filtering Operators

name rxcpp rpp prev rpp ratio
create+take(1)+subscribe 638.66 ns 0.40 ns 0.40 ns 0.99
create+filter(true)+subscribe 366.13 ns 0.40 ns 0.40 ns 1.00
create(1,2)+skip(1)+subscribe 571.95 ns 0.40 ns 0.41 ns 0.98
create(1,1,2)+distinct_until_changed()+subscribe 384.11 ns 0.40 ns 0.80 ns 0.50

Utility Operators

name rxcpp rpp prev rpp ratio
create(1)+subscribe_on(immediate)+subscribe 1774.62 ns 0.40 ns 0.40 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 3612.90 ns 3.17 ns 2.39 ns 1.33
Subscribe empty callbacks to empty observable via pipe operator 4349.33 ns 10.65 ns 2.37 ns 4.49

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 12372.04 ns 23.01 ns 9.25 ns 2.49
from array of 1 - create + subscribe + current_thread 12293.55 ns 60.66 ns 29.98 ns 2.02
concat_as_source of just(1 immediate) create + subscribe 11050.00 ns 53.08 ns 14.66 ns 3.62

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 2116.43 ns 5.23 ns 5.40 ns 0.97
current_thread scheduler create worker + schedule 4690.84 ns 40.27 ns 13.49 ns 2.98
current_thread scheduler create worker + schedule + recursive schedule 3061.00 ns 2509.69 ns 163.91 ns 15.31

Combining Operators

name rxcpp rpp prev rpp ratio
create(create(1), create(1)) + merge() + subscribe 5543.21 ns 369.93 ns 507.52 ns 0.73
create(1) + merge_with(create(2)) + subscribe 8768.55 ns 366.27 ns 484.17 ns 0.76

Conditional Operators

name rxcpp rpp prev rpp ratio
create+take_while(false)+subscribe 1442.51 ns 4.09 ns 5.25 ns 0.78
create+take_while(true)+subscribe 1331.40 ns 5.42 ns 6.91 ns 0.78

Transforming Operators

name rxcpp rpp prev rpp ratio
create+map(v*2)+subscribe 16505.71 ns 50.30 ns 6.94 ns 7.24
create+scan(10, std::plus)+subscribe 16763.49 ns 56.54 ns 10.71 ns 5.28
create+flat_map(just(v*2))+subscribe 9840.00 ns 5381.84 ns 382.08 ns 14.09

Filtering Operators

name rxcpp rpp prev rpp ratio
create+take(1)+subscribe 2417.77 ns 7.53 ns 9.30 ns 0.81
create+filter(true)+subscribe 1340.51 ns 6.44 ns 7.41 ns 0.87
create(1,2)+skip(1)+subscribe 2122.95 ns 7.26 ns 8.52 ns 0.85
create(1,1,2)+distinct_until_changed()+subscribe 1369.89 ns 14.77 ns 18.12 ns 0.82

Utility Operators

name rxcpp rpp prev rpp ratio
create(1)+subscribe_on(immediate)+subscribe 4748.83 ns 11.60 ns 14.31 ns 0.81

@victimsnino victimsnino marked this pull request as ready for review June 22, 2023 09:07
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #380 (eafe98e) into v2 (45dcfce) will decrease coverage by 0.64%.
The diff coverage is 92.18%.

@@            Coverage Diff             @@
##               v2     #380      +/-   ##
==========================================
- Coverage   99.14%   98.51%   -0.64%     
==========================================
  Files          38       40       +2     
  Lines         820      807      -13     
==========================================
- Hits          813      795      -18     
- Misses          7       12       +5     
Impacted Files Coverage Δ
src/rpp/rpp/disposables/base_disposable.hpp 100.00% <ø> (ø)
src/rpp/rpp/observables/blocking_observable.hpp 100.00% <ø> (ø)
src/rpp/rpp/observables/dynamic_observable.hpp 100.00% <ø> (ø)
src/rpp/rpp/observers/fwd.hpp 28.57% <0.00%> (-71.43%) ⬇️
src/rpp/rpp/operators/distinct_until_changed.hpp 100.00% <ø> (ø)
src/rpp/rpp/operators/filter.hpp 100.00% <ø> (ø)
src/rpp/rpp/operators/map.hpp 100.00% <ø> (ø)
src/rpp/rpp/operators/scan.hpp 100.00% <ø> (ø)
src/rpp/rpp/operators/skip.hpp 100.00% <ø> (ø)
src/rpp/rpp/operators/take.hpp 100.00% <ø> (ø)
... and 15 more

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

@sonarcloud
Copy link

sonarcloud bot commented Jun 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

90.0% 90.0% Coverage
0.0% 0.0% Duplication

@victimsnino victimsnino merged commit 297bbc6 into v2 Jun 26, 2023
@victimsnino victimsnino deleted the avoid_recursion branch June 26, 2023 08:04
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