Hacker News new | ask | show | jobs
by dgacmu 13 days ago
You're talking about concurrency and I'm talking about parallelism. :-)

Rust's async situation is still a pain in many ways.

But throwing Rayon at something often results in very reasonable parallel performance gains without cluttering things much. It usually won't get you to an optimal solution, but it's good for 80% with 10% of the pain.

2 comments

I interpreted GP as talking about maintaining Rust code that was written with performance in mind by people who were not familiar with the difference, and who shot themselves in the foot as a result.
It depends on what you are going for: service latency, or throughput. Rayon's work stealing is inappropriate for any throughput oriented work and questionable for the majority of latency sensitive services. It does have a niche but it's not the first thing I would reach for. Unfortunately it IS the first thing Claude reaches for.