Skip to content

Commit

Permalink
update all the numbers and graphics to use release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
grafele committed Aug 6, 2019
1 parent 0fc2c80 commit a701081
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@ This project contains a benchmarking test suite for comparing the performance of

The RxSwift performance benchmark tests are [the original ones used in the RxSwift project](https://github.com/ReactiveX/RxSwift/blob/master/Tests/Benchmarks/Benchmarks.swift). We removed the two tests from RxCocoa testing Drivers, since there is no equivalent in Combine. The Combine tests are 1:1 translated tests from the Rx test-suite and should, therefore, be easily comparable.

*Important update:* As mentioned correctly these numbers are created with XCTests running in DEBUG mode. The differences seem not so critical in Release builds. We will update the statistics in the following hours.
**Important update:** As mentioned correctly the old numbers were created with XCTests running in DEBUG mode. The differences seem not so critical in Release builds. We have updated all the numbers and graphs to use release builds.

![](https://quickbirdstudios.com/files/benchmarks/all.png)
![](https://quickbirdstudios.com/files/benchmarks/all_release.png)

As a summary Combine was faster in every test and on average 4,5x more performant than RxSwift. These statistics show every test-method and its results. Lower is better.
As a summary Combine was faster in every test and on average 41% more performant than RxSwift. These statistics show every test-method and its results. Lower is better.

## Test Results Summary

**Test** | **RxSwift (ms)** | **Combine (ms)** | **Factor**
--- | --- | --- | ---
**PublishSubjectPumping** | 2.463 | 495 | 4,98x
**PublishSubjectPumpingTwoSubscriptions** | 4.182 | 618 | 6,77x
**PublishSubjectCreating** | 841 | 341 | 2,47x
**MapFilterPumping** | 1.321 | 181 | 7,30x
**MapFilterCreating** |512 | 160 | 3,20x
**FlatMapsPumping** | 2.444 | 419 | 5,83x
**FlatMapsCreating** | 673 | 149 | 4,52x
**FlatMapLatestPumping** | 1.873 | 766 | 2,45x
**FlatMapLatestCreating** | 551 | 208 | 2,65x
**CombineLatestPumping** | 1.284 | 313 | 4,10x
**CombineLatestCreating** | 1.743 | 400 | 4,36x
**PublishSubjectPumping** | 227 | 135 | 168%
**PublishSubjectPumpingTwoSubscriptions** | 400 | 246 | 163%
**PublishSubjectCreating** | 295 | 250 | 118%
**MapFilterPumping** | 123 | 132 | 93%
**MapFilterCreating** |168 | 114 | 147%
**FlatMapsPumping** | 646 | 367 | 176%
**FlatMapsCreating** | 214 | 121 | 177%
**FlatMapLatestPumping** | 810 | 696 | 116%
**FlatMapLatestCreating** | 263 | 180 | 146%
**CombineLatestPumping** | 298 | 282 | 106%
**CombineLatestCreating** | 644 | 467 | 138%

### Testing Details
**Machine**: MacBook Pro 2018, 2,7 GHz Intel Core i7, 16 GB
**IDE**: Xcode 11.0 beta 5 (11M382q)
**Testing Device**: iPhone XR Simulator

## Performance Test Example: PublishSubject Pumping

Expand Down Expand Up @@ -79,45 +84,45 @@ func testPublishSubjectPumping() {

### PublishSubjectPumping

![](https://quickbirdstudios.com/files/benchmarks/1.png)
![](https://quickbirdstudios.com/files/benchmarks/1_release.png)

### PublishSubjectPumpingTwoSubscriptions

![](https://quickbirdstudios.com/files/benchmarks/2.png)
![](https://quickbirdstudios.com/files/benchmarks/2_release.png)

### PublishSubjectCreating

![](https://quickbirdstudios.com/files/benchmarks/3.png)
![](https://quickbirdstudios.com/files/benchmarks/3_release.png)

### MapFilterPumping

![](https://quickbirdstudios.com/files/benchmarks/4.png)
![](https://quickbirdstudios.com/files/benchmarks/4_release.png)

### MapFilterCreating

![](https://quickbirdstudios.com/files/benchmarks/5.png)
![](https://quickbirdstudios.com/files/benchmarks/5_release.png)

### FlatMapsPumping

![](https://quickbirdstudios.com/files/benchmarks/6.png)
![](https://quickbirdstudios.com/files/benchmarks/6_release.png)

### FlatMapsCreating

![](https://quickbirdstudios.com/files/benchmarks/7.png)
![](https://quickbirdstudios.com/files/benchmarks/7_release.png)

### FlatMapLatestPumping

![](https://quickbirdstudios.com/files/benchmarks/8.png)
![](https://quickbirdstudios.com/files/benchmarks/8_release.png)

### FlatMapLatestCreating

![](https://quickbirdstudios.com/files/benchmarks/9.png)
![](https://quickbirdstudios.com/files/benchmarks/9_release.png)

### CombineLatestPumping

![](https://quickbirdstudios.com/files/benchmarks/10.png)
![](https://quickbirdstudios.com/files/benchmarks/10_release.png)

### CombineLatestCreating

![](https://quickbirdstudios.com/files/benchmarks/11.png)
![](https://quickbirdstudios.com/files/benchmarks/11_release.png)

0 comments on commit a701081

Please sign in to comment.