Skip to content

swift-callbag/callbag-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

CallbagBenchmark ⏱️

The following results were ran on a linux machine with Intel Core i7 CPU 3.7GHz, and Swift 5.0. These are microbenchmarks, except for the dataflow benchmark which more realistically reflects an application with streams.

Performance results

DataFlow
library Cold - Observable Hot - Observable
time std time std
CallbagKit 7.929 secs ± 0.27 % 14.784 secs ± 0.25 %
ReactiveSwift 10.143 secs ± 0.21 % 15.816 secs ± 0.18 %
RxSwift 50.330 secs ± 0.09 % 29.014 secs ± 0.14 %

Fold
library Cold - Observable Hot - Observable
time std time std
CallbagKit 1.302 secs ± 0.27 % 1.922 secs ± 0.23 %
ReactiveSwift 1.306 secs ± 0.21 % 3.231 secs ± 0.45 %
RxSwift 22.424 secs ± 0.11 % 7.963 secs ± 0.13 %

FilterMapReduce
library Cold - Observable Hot - Observable
time std time std
CallbagKit 1.088 secs ± 0.41 % 1.854 secs ± 0.95 %
ReactiveSwift 1.083 secs ± 0.51 % 2.697 secs ± 0.23 %
RxSwift 20.699 secs ± 0.10 % 6.192 secs ± 0.08 %

FilterMapFusion
library Cold - Observable Hot - Observable
time std time std
CallbagKit 1.797 secs ± 0.16 % 2.574 secs ± 0.21 %
ReactiveSwift 1.196 secs ± 0.37 % 3.706 secs ± 0.35 %
RxSwift 21.458 secs ± 0.08 % 7.130 secs ± 0.11 %

Combine
library Cold - Observable Hot - Observable
time std time std
CallbagKit 6.091 secs ± 0.14 % 1.496 secs ± 0.33 %
ReactiveSwift 8.020 secs ± 0.16 % 10.048 secs ± 0.18 %
RxSwift 50.308 secs ± 0.06 % 19.731 secs ± 0.09 %

Zip
library Cold - Observable Hot - Observable
time std time std
CallbagKit 7.659 secs ± 0.23 % 9.173 secs ± 0.16 %
ReactiveSwift 1235.180 secs ± 0.08 % 9.578 secs ± 0.15 %
RxSwift 42.935 secs ± 0.24 % 13.068 secs ± 0.26 %

Merge
library Cold - Observable Hot - Observable
time std time std
CallbagKit 3.964 secs ± 0.20 % 5.672 secs ± 0.29 %
ReactiveSwift 6.910 secs ± 0.08 % 9.429 secs ± 0.63 %
RxSwift 46.241 secs ± 0.23 % 16.621 secs ± 0.06 %

About

⏱️ Performance results for CallbagKit

Resources

Stars

Watchers

Forks

Languages