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

Discussion: RxSwift Benchmark vs. Promises #4

Closed
freak4pc opened this issue Jan 27, 2018 · 2 comments
Closed

Discussion: RxSwift Benchmark vs. Promises #4

freak4pc opened this issue Jan 27, 2018 · 2 comments

Comments

@freak4pc
Copy link

freak4pc commented Jan 27, 2018

Congratulations on the release of the new Promise library! It looks great and the implementations seems extremely fast and efficient.

I've read the Benchmark you published and noticed RxSwift is one of the "Compared-against" libraries.

This isn't out of "blind love" of RxSwift (it has its flaws and strengths), but comparing a Promise library to a full-blown Rx implementation seems "unfair" or wrong in its basis.

I'd love to learn why you made the decision to compare against it specifically, since it is entirely not a Promise library at its basis (as opposed to PromiseKit or BrightFutures that specifically provide a solution for the "Promise" problem) .

Regardless, since I think all libraries benchmarked against "Google Promises" would love to improve their performance - I, for one, would appreciate it if you could publish the code you used to benchmark against each of the libraries, just so that developers get full clarity while library developers have the opportunity to find bottlenecks they might fix.

Appreciate your response and thoughts on this matter :)

@shoumikhin
Copy link
Contributor

Hi Shai,

I totally agree the comparison with Rx implementation may look odd. The reason it's there in the first place, is because we use RxSwift for several projects at Google and there was an internal request to compare the performance of the two, after we had the initial data for all other popular promises implementations.

To address that request we tried to write performance tests for RxSwift in such a way that they would imitate A+-style promises as close as possible, so we had to use Subjects. Using any other type of Observable lead to 2x and more performance downgrade in our experience.

Here's a snippet you can add to performance tests to reproduce our results.

Please, let us know if there's a better way to compare the two at least in such a limited way.
Many thanks for the great question!

@freak4pc
Copy link
Author

Hey @shoumikhin, I really appreciate you answering so promptly, and It's exciting to know RxSwift is used internally on some Google projects.

I'll close this issue for now and will comment back if there are any new findings regarding this :)

Thanks!

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

No branches or pull requests

2 participants