tokopedia / RxComposableArchitecture

RxComposableArchitecture is a forked of Composable Architecture with adjustment to make it work with UIKit.
Apache License 2.0
31 stars 5 forks source link

Update store scoping to be more efficient. #55

Closed adityadaniel closed 2 years ago

adityadaniel commented 2 years ago

Implement https://github.com/tokopedia/RxComposableArchitecture/issues/51 to make store scoping more efficient

Discussion on Pointfree repo https://github.com/pointfreeco/swift-composable-architecture/discussions/1290\

Updated benchmark

name                                                               time          std        iterations
------------------------------------------------------------------------------------------------------
Effects.Merged Effect.none (create, flat)                           31583.000 ns ±   8.91 %      44158
Effects.Merged Effect.none (create, nested)                         63667.000 ns ±   3.10 %      21640
Effects.Merged Effect.none (sink)                                  115250.000 ns ±   7.35 %      11741
Store scoping.Nested store                                          22792.000 ns ±  18.22 %      58805
[NEW] Store scoping.[NEW] Nested store                      16500.000 ns ±   3.76 %      84861
[NEW] Store scoping, with rescope.[NEW] Nested store, with rescope   7500.000 ns ±   7.48 %     185106
jeffersonsetiawan commented 2 years ago

we just get QA Approve, will merge it now