4 ms·
> Neither .NET's nor Rust's Tokio async implementations work this way. Well that’s great. I didn’t mention Rust in that list because it does seem to perform we
by elcritch 2y ago
> Neither .NET's nor Rust's Tokio async implementations work this way.
Well that’s great. I didn’t mention Rust in that list because it does seem to perform well. Its async is also known as to be much more difficult to program.
> and having much lower memory footprint. You cannot compare Erlang/Elixir with top of the line compiled languages.
And yet I do and have. Despite all the cool tech for C# and .Net, I’ve seen simple C# web apps struggle to even run on Raspberry pi’s for IoT projects while Elixir ones run very well.
Also note Elixir is a compiled language and BEAM has JIT nowadays too.
I did hesitate to add C# to that list because it is an impressive language and can perform well. I also know the least about its async.
Nothing you said really counters that async as a general paradigm is more likely to lead to worse performance. It’s still more difficult to profile and tune than other techniques even with M:N schedulers. Look at the sibling post talking about resource allocation.
Even for Rust there was a HM post recently where they got a Rust service to run a fair bit faster than their initial Golang implementation. After months of extra work that is. They mentioned that Golang’s programming model made it much easier to write fairly performant networking code for. Since Go doesn’t use async it seems reasonable to assume go routines are easier to profile and track than async even if I lack knowledge of Go’s implementation details on the matter. Now I am assuming their Rust implementation used async but don’t know for sure.
- neonsunset 2y ago> Also note Elixir is a compiled language and BEAM has JIT nowadays too. Let's see it perform faster than Python first :) Also, if the target is supported, .NET is going to unconditionally perform faster than Elixir. This is trivially provable. > Nothing you said really counters that async as a general paradigm is more likely to lead to worse performance. It’s still more difficult to profile and tune than other techniques even with M:N schedulers. Look at the sibling post talking about resource allocation. Can you provide any reference to support this claim as far as actually good implementations go? Because so far it looks like vibe-based reasoning with zero knowledge to substantiate the opinion presented as fact. That's not surprising however - Erlang and Elixir as languages tend to leave their heavy users with big knowledge and understanding gaps and their communities are rather dogmatic about BEAM being the best next thing since sliced bread. Lack of critical thinking leads to such a sorry place.
- elcritch 2y ago> Can you provide any reference to support this claim as far as actually good implementations go? Ah yes now to the No True Scotsman fallacy. Async only works well when it’s “properly implemented” which is only .NET. Even some .NET folks prefer actors model for concurrent programming: > Orleans is the most underrated technology out there. Not only does it power many Azure products and services, it is also the design basis for Microsoft Service Fabric actors, which also power many Azure products. Virtual actors are the perfect solution for today’s distributed systems. > In my experience Orleans was able to handle insane write load (our storage/persistence provider went to a queue instead of direct, it was eventually consistent) so we were able to process millions of requests without breaking a sweat. Perhaps others would want more durability, we opted for this as the data was also in a time series database before Orleans saw it. https://www.reddit.com/r/dotnet/comments/16kk2l1/comment/k0xzbs4/ https://www.reddit.com/r/dotnet/comments/16kk2l1/comment/k0x... https://learn.microsoft.com/en-us/dotnet/orleans/benefits https://learn.microsoft.com/en-us/dotnet/orleans/benefits Ironically what got me into Elixir was learning about Orleans and how successful it was in scaling XBox services. > Because so far it looks like vibe-based reasoning with zero knowledge to substantiate the opinion presented as fact. Aside from personal experience and years of writing and deploying performance sensitive IoT apps? Well quick googling shows quite a few posts detailing async issues: > What tools and techniques might be suited for this kind of analysis? I took a quick glance at a flamegraph but it seems like I would need a relatively deep understanding of the async runtime internals since most of what I see looks like implementation details. https://www.reddit.com/r/rust/comments/uph4tf/profiling_with_asyncstd/ https://www.reddit.com/r/rust/comments/uph4tf/profiling_with... > Reading a 1GB file in 100-byte chunks leads to at least 10,000,000 IOs through three async call layers. The problem becomes catastrophic since these functions are essentially language-level abstractions of callbacks, lacking optimizations that come with their async nature. However, we can manually implement optimizations to alleviate this issue. https://www.ajanibilby.com/blog/async-js-performance-apr23/ https://www.ajanibilby.com/blog/async-js-performance-apr23/ > Asynchronous Rust seems to perform worst than multi-threaded Rust implementations. https://dev.to/deepu105/concurrency-in-modern-programming-languages-rust-vs-go-vs-java-vs-nodejs-vs-deno-36gg https://dev.to/deepu105/concurrency-in-modern-programming-la... > Under realistic conditions (see below) asynchronous web frameworks are slightly worse throughput (requests/second) and much worse latency variance. https://calpaterson.com/async-python-is-not-faster.html https://calpaterson.com/async-python-is-not-faster.html > I’m not going to say all async frameworks are definitely slower than threads. What I can say confidently is that asyncio isn’t faster, and it’s more efficient only for huge numbers of mostly idle connections. And only for that. https://emptysqua.re/blog/why-should-async-get-all-the-love/ https://emptysqua.re/blog/why-should-async-get-all-the-love/ https://users.rust-lang.org/t/my-benchmark-done-elixir-is-faster-than-rust-tokio-how-do-i-improve-rust-code/68577 https://users.rust-lang.org/t/my-benchmark-done-elixir-is-fa... https://blog.blackfire.io/the-challenges-of-async-python-observability-profiling-asynchronous-code-2-3.html https://blog.blackfire.io/the-challenges-of-async-python-obs...