-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Async is not the holy grail #27
Comments
To take things into a usable direction it would help to provide claims + actual benchmark code to validate those claims. As async's main reason is to prevent stalling during io or blocking syscalls until a limited amount of time (at least for scripting), I would defer the decision until |
Thanks for the link - I am glad that Zig devs know about CXL (and alike) becoming the norm in the next couple of years (I share @TwoClocks opinion). Admittedly though I am a bit lost here in this thread because what @TwoClocks wrote further underlines that async/await (i.e. event loop with necessary - small but non-negligible - overhead) is not the way to go if one seeks a generic concurrent construct with the lowest possible overhead (definitely lower than async/await) which is able to leverage multicore HW. Do not take me wrong - the approach I linked is certainly not the only one to explore. And by explore I really meant "try and see" (not "it is the final holy grail solution which you must go for") 😉. Btw. CXL (and RAM access generally) is super slow (1-2 orders of magnitude) compared to where the "sync vs async" stuff is being contested (i.e. in this discussion thread). With |
I did some async benchmarks a while back. You can find them here: TwoClocks/coroutine-benchmarks In my mental model, I think a decent event-loop and job scheduler should work fine in either a My comments in the Zig thread were more about the IO APIs than about |
I do like them being sugar to replace callback hell. It is far more readable to see what is going on when an instruction sheet just looks like a list of requests for futures and then routing them somewhere else. In Lua you have to resort to shenanigans with coroutine yields and in Nim they are just a compile-time macro that tries to replace everything with equivalent code using futures and some kind of resumable state machine. |
Saw some preliminary mentions of
async
support in the future Cyber. I just wanted to point out that async is by far not a solution:What color is your function?
Asynchronous Everything
Why is
async
"slow" and can not be made fast without making itsync
1Why is
async
"slow" and can not be made fast without making itsync
2Instead I would prefer Cyber exploring the space outlined in Proper support for distributed computing, parallelism and concurrency (yeah, I am obviously biased 😉).
The text was updated successfully, but these errors were encountered: