Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The Original Sin of Rust async programming is making it multi-threaded by default

So, obviously having to sprinkle Arc and Mutex all over the place sucks as a developer experience. But how much does that really impose in terms of runtime overhead? Both of those structures tend to perform decently in the single-threaded case. It's obviously useless work, but I'd be surprised if that shows up on any profiles as a bottleneck.



Also important to note that while you might clone an Arc in some places (like at the beginning of a request) you can almost always just use `.as_ref()` to take a 0-cost reference to the value, thanks to borrow checking.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: