I don't currently do any Rust programming, but thread FWIW: https://twitter.com/mik235/status/1129246179835883520 … (async/await is a mistake)
-
-
Promises/async/await seem like a total hack necessary for JavaScript only. Why would languages that don’t need (Rust, C++) it adopt it? What am I missing? It’s miserable in JS, too.
4 replies 0 retweets 5 likes -
Because it’s the fastest of all available options. Coroutines needs stacks and are therefore slower.
4 replies 0 retweets 6 likes -
I don’t see how that necessarily follows, but I’ll believe you
1 reply 0 retweets 1 like -
It’s mostly all about malloc perf. Async/await avoids allocations (alliteration!) BTW, the syscall cost of spawning a thread on Linux is a lot less than the cost of allocating the stack.
3 replies 0 retweets 9 likes -
This Tweet is unavailable.
-
I don’t have up-to-date numbers but I know it was a pretty big difference on really high C10K-style workloads. Alex, Carl, etc. probably can cite you some benchmarks.
0 replies 0 retweets 1 like -
This Tweet is unavailable.
-
Go’s concurrency model is fundamentally broken: https://songlh.github.io/paper/go-study.pdf …
3 replies 0 retweets 1 like -
Replying to @bascule @valarauca1 and
Eh, not for that reason though. Having small stacks *is* a nice advantage of GC.
2 replies 0 retweets 0 likes
One interesting thing is that having userland M:N threads and small stacks are actually independent decisions, contrary to popular belief. You could have 1:1 threading and small stacks.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.