CombineRxSwiftPerformance icon indicating copy to clipboard operation
CombineRxSwiftPerformance copied to clipboard

Add ReactiveSwift tests

Open olejnjak opened this issue 6 years ago • 6 comments

Hi,

as I usually use ReactiveSwift I thought it would be great to add it to the comparison as well.

olejnjak avatar Aug 08 '19 13:08 olejnjak

Wow, amazing! I will take a look and also update the statistics before I merge it. Will then also include the numbers file, so that everyone can update the graphics as well.

grafele avatar Aug 08 '19 13:08 grafele

I've added one comment and ran the tests locally. The crazy thing is, that the tests for ReactiveSwift are much much slower. Do you know any reason for this?

Bildschirmfoto 2019-08-08 um 17 31 56

grafele avatar Aug 08 '19 15:08 grafele

Not sure, I was as surprised as you are. I've opened a discussion on ReactiveSwift Slack if it is really that slow or the tests don't do what thay should (but I honestly doubt that)

olejnjak avatar Aug 08 '19 18:08 olejnjak

Hmm ok. I would be ready to merge it, but I would prefer waiting for a response to your question in the slack channel. Maybe you can also ask in an issue on github as well.

grafele avatar Aug 08 '19 20:08 grafele

Well the only answer I got so far is link to Twitter thread you are part of 🤷‍♂️ I’ll file an issue

olejnjak avatar Aug 09 '19 06:08 olejnjak

Judging by the benchmark, I see a logical pattern here:

  1. The MapFilter test cases involve only SignalProducer and two single-stream transform operators, which have been heavily optimised to reduce overhead (e.g. eliminate unnecessary locks ) whenever possible.

  2. The rest of the test cases all either use the RAS thread-safe, multicast Signal primitive, or use operators that are backed by it (basically all flattening operators).

With (2), I can see how it can snowball into a significant deficit. Nonetheless, it would still be an interesting performance case to look into.

andersio avatar Sep 08 '19 12:09 andersio