-
Notifications
You must be signed in to change notification settings - Fork 4
The benchmark is inconsistent #3
Comments
The worst part is that the benchmark was used by async-std team for favourable comparison with tokio. |
That's unfortunate, and suggests to me that the "warm up" I implemented isn't appropriate after all. Moving measurements to run in various different orders and counts makes results vary much more than I expected (and more than I remember from past iterations of this). I also get panics with In my eyes this just underscores:
I'll try to improve the warmup or play with execution orders and counts to make things more fair (or consistent, etc.), and am happy to take suggestions/PRs that do the same.
Ah, that explains why people have started looking at this. |
This benchmark is used to misrepresent the actual state of things: https://async.rs/blog/announcing-async-std-1-0/ I suggest replacing the README file with a note that this benchmark is broken at its current state. |
I'd like to add that we caught a bug on our side and now get consistent results over every run, independent of order. The outliers that @frol saw were indeed real and due to runaway threads. |
I've merged #4 and several of my own commits, which should help eliminate some of the worst variability. I never believed (and still don't) that this benchmark is suitable as a general
I believe this was a direct result of my own (pretty low) |
The benchmark gets more consistent, yet I still observe odd behaviour (see below). So here is the "normal run":
Nice and consistent, but if I comment out async-std:
It takes tokio more time to do the same work than when the benchmark is done with async-std. Well, at least async-std does not show this oddity, so it is limited to tokio.
P.S. I have submitted a PR which avoids unnecessary allocations: #5 |
This is actually an interesting find. We'll check that, as mixed applications might be a reality in the future. |
Uh oh!
There was an error while loading. Please reload this page.
Hey, I have just swapped the order of executions (async-std goes first and tokio is second):
async-std is now twice as slow. Yet, when I run it in the order it is in this repo:
I have isolated tokio and async-std (commented away one of the two) and run separately:
I have even caught an outlier once with async-std:
My environment:
The text was updated successfully, but these errors were encountered: