-
Notifications
You must be signed in to change notification settings - Fork 33
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
Provide benchmark code #22
Comments
The benchmark I used for that article was the testSyncMapPerformance and testAsyncMapPerformance in the CwlSignal tests. I implemented equivalents in RxSwift and ReactiveSwift but I might need to dig them out of a backup. I'll need to check these tests though. It sounds like something is wrong with either the tests or CwlSignal. |
Fixing some of the obvious issues with the test (for-in loop count on test 4, not using beta CwlSignal) brings things closer to expected perf, though still nowhere near the 2-10 times faster mark (of course these tests may likely not be covering those cases). I really like the decisions made in this lib so as long as this isn't significantly slower than other reactive libs it's good enough for me. EnvironmentmacOS 10.13.3 (17D47) Cartfile
Average times
Full test output
|
By the way, regarding this note on the blog post:
I notice CwlSignal no longer includes CwlUtils directly anymore, does this mean that Swift now inlines across modules? |
I haven't forgotten about this issue... I do still want to provide some up-front benchmarking of CwlSignal. However, there's a lot about Swift and package management that affects performance – you often need to compromise for performance or convenience. I comment a little on this issue in this article: https://www.cocoawithlove.com/blog/updating-for-2018.html#cwlsignal |
I can't believe I missed the update to your blog! Unrelated to this issue: it would be very helpful if you include "updated on" dates on your blog. |
On your blog post introducing CwlSignal (emphasis added):
Can you provide more detail on how you arrived at this and what specific libraries you were comparing against? It would be great if others could be able to reproduce those results.
I ran into this repo recently and the result were unexpected considering the performance claim. CwlSignal ended up coming last in all tests, in some cases significantly.
I'm not trying to accuse you of misleading. Certainly there are going to be flaws in the way those tests are done*, but currently that's the only comparison of frp libs for ios that I could find.
* In particular, the version of each lib used in that repo had to be updated. One of the tests had to be modified because it was unfairly iterating far more on CwlSignal than others, etc...
The text was updated successfully, but these errors were encountered: