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

Promises vs Facebook Bolts-ObjC #18

Closed
steipete opened this issue Feb 5, 2018 · 2 comments
Closed

Promises vs Facebook Bolts-ObjC #18

steipete opened this issue Feb 5, 2018 · 2 comments

Comments

@steipete
Copy link

steipete commented Feb 5, 2018

First of all, many thanks for releasing promises, it looks extremely useful and I'm happy that we still see a few great Objective-C libraries in 2018.

I notice that you compare it with quite a few other promises libraries, but not with Facebook's Bolts-ObjC framework. Since that just came up on twitter I'd love to see a comparison/thoughts on how where the main differences are.

If issues are not the right place for these kind of questions, happy to close and post this somewhere else. Thanks!

@shoumikhin
Copy link
Contributor

Thanks, Peter!

Actually, the library has been there for a while and we used it internally instead of any other 3rd party solution. Eventually, we've decided to make it public in hope the community would find it useful and contribute with improvements.

Here's the data for Bolts ObjC performance tests you've requested:

Test Case Time in sec
testContinueWithBlockOnSerialQueue 0.00002586
testDoubleContinueWithBlockOnSerialQueue 0.00003285
testTripleContinueWithBlockOnSerialQueue 0.00003776
testContinueWithBlockOnConcurrentQueue 0.02312784

And these are the numbers for Promises ObjC performance tests, ran on the same device (iPhone 6s, iOS, 11.2.5):

Test Case Time in sec
testThenOnSerialQueue 0.00002572
testDoubleThenOnSerialQueue 0.00003398
testTripleThenOnSerialQueue 0.00003697
testThenOnConcurrentQueue 0.02318964

The results look surprisingly similar. Presumably, because both Bolts and Promises are highly optimized to provide minimum overhead over plain GCD.

Feel free to contribute with other types of tests you'd like to see. Code snippets are highly appreciated.

@steipete
Copy link
Author

steipete commented Feb 6, 2018

Thanks! We'll look at both and potentially follow up with a post. I appreciate the time!

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