Morestina
morestina.net · Personal blog · on HN since 2017
Morestina is a Rust programmer's blog on concurrency, lock-free data structures, async and performance pitfalls.
What HN saysHN links it for Rust concurrency posts; commenters cite its lock-free series benchmarks and note the shifting stance in its 'async is colored' post.
15HN people shared it
2linked it in comments
17stories submitted
69story points
2 years agolast shared
2017people per year2026
Most-shared posts
- 1Rust async is colored, and that’s not a big deal6 people · 9 points · first shared 2021 · discussion on HN
- 2A close encounter with false sharing in Rust6 people · 8 points · first shared 2023 · discussion on HN
- 3Exploring Lock-Free Rust (2017)2 people · 44 points · first shared 2017 · 6 comments on HN
- 4Contention on multi-threaded regex matching in Rust1 people · 3 points · first shared 2024 · discussion on HN
- 5Parallel stream processing with Rayon in Rust1 people · 2 points · first shared 2020 · discussion on HN
- 6The Stable HashMap Trap1 people · 2 points · first shared 2022 · 1 comments on HN
- 7Upgradable parking_lot:RwLock might not be what you expect1 people · 1 points · first shared 2021 · discussion on HN
- 8Exploring lock free rust 3 crossbeam1 people · first shared 2022
What HN people wrote when they linked it
jeroenhd · 2022-09-22
This is the first of a series of three blog posts, with quite an interesting conclusion in the final post[1]:
> On my 2012 desktop workstation with 3GHz Xeon W3550, the Java benchmark reports an average of 7.3 ns per getTransformed invocation. The Rust benchmark reports 128 ns in get_transformed, a whopping 17 times slower execution. [...]
This article was written five years ago and things may have changed for better or for worse. However, this is an obvious example of how using Rust can make your code slower: by making you implement all the nitty-gritty details yourself (i.e. multi-threaded locking mechanisms), getting everything right and up to speed is left up to you rather than to the standard library, like in Java, where dedicated people have been improving their solution to this problem for decades now.
Rust can be lightning fast compared to Java but it's worth considering using the "slower" alternative for certain workloads (in this case, many cross-thread operations) to get a performance benefit. All the talk about Rust's fearless multithreading does not necessarily make it a good language, merely a less correctness-bug-prone alternative to C++!
I've run the benchmarks on my machine with an up-to-date Rust install; to prevent library bugs, I've also upgraded Rusts's dependencies to the highest level they'll go. For the Java samples, I'm running Java 18 with the default GC (haven't set up 19 yet on my machine).
The results are kind of wild. On the Rust side, the…
diragon · 2021-04-26
First it was "Rust's async isn't f#@king colored!" (https://www.hobofan.com/blog/2021-03-10-rust-async-colored/)
Then "Rust async is colored, and that’s not a big deal" https://morestina.net/blog/1686/rust-async-is-colored
And now it's a good thing.
Honestly, this sounds like somebody struck Achilles' heel of Rust and it hurts. They're neatly covering 3 stages of grief over these 3 articles, and I wouldn't be surprised if we could uncover the other 2 in the blogosphere somewhere.