Re:Why does musl make my Rust code so slow? (2020)
by pcwalton on Wednesday December 13, 2023 @01:05AM
(#38623306)
It's not a few dozen lines of code because of, among other things, the case in which one thread allocates a lot of memory that is then sent to another thread to be freed. This actually happens more frequently than you'd think, because of producer/consumer patterns. In that case stop-the-world synchronization must happen in order to re-balance the pools in order to avoid what are essentially memory leaks. This is complex and is actually fairly similar to garbage collection.
[ Parent
| on HN ]