News for hackers. Stuff that matters.
Re:Crossbeam – Tools for concurrent programming in Rust by pornel on Sunday April 17, 2022 @08:01AM (#31060278)
To give more background on this:

· crossbeam is a building block used in Rayon, which is Rust's main data parallelism library, roughly similar to OpenMP.

· crossbeam channels are very fast. They're in the same league as golang, sometimes faster (depending how you measure of course).

· crossbeam is an order of magnitude faster than channels in the Rust's standard library, while being more powerful and simpler to use. This is an example where experimentation in a 3rd party crate paid off compared to the standard library where a basic implementation went to die.

· it integrates with Rust's borrow checker of course, so you can use complex multi-threaded constructs (e.g. share stack-allocated objects between threads) without fear of data races or use-after-free.

Re:Crossbeam – Tools for concurrent programming in Rust by ChrisSD on Sunday April 17, 2022 @08:37AM (#31060423)
Note that there are plans to integrate crossbeam's channel implementation into the standard library. This won't change the public API but would at least vastly improve the implementation. A similar thing was done with changing the implementation of `HashMap` to be a wrapper around the `hashbrown` library.