Which Mutex to use in this case (independent tasks, partially under contention)

This page summarizes the projects mentioned and recommended in the original post on /r/rust

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • parking_lot

    Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.

    parking_lot still has an open issue #201: Heavily degraded performance while in extreme contention on some processors which reveals that parking_lot selfishly uses spinning locks under some circumstances to sacriice total system efficiency in the name of trying to improve its own latency. In my opinion, the only place spinning locks are excusable is fullscreen games and, even then, Linus Torvalds is of the opinion they're usually implemented wrong. (Issue 201 also includes a bunch of benchmark runs if you want to read through to figure out which one applies to the current shipping state of the codebase.)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • proptest

    Hypothesis-like property testing for Rust

    Third, if you're opting out of a compile-time safety guarantee in the name of performance, test heavily (high-coverage unit tests, property testing, fuzzing, differential fuzzing, etc.) and make use of tools like Loom and Miri's runtime data race detector for unsafe code, which can catch stuff that is beyond the scope of the compiler's guarantees.

  • miri

    An interpreter for Rust's mid-level intermediate representation

    Third, if you're opting out of a compile-time safety guarantee in the name of performance, test heavily (high-coverage unit tests, property testing, fuzzing, differential fuzzing, etc.) and make use of tools like Loom and Miri's runtime data race detector for unsafe code, which can catch stuff that is beyond the scope of the compiler's guarantees.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Declarative Rust macros explanation

    2 projects | /r/rust | 5 Dec 2023
  • What Are The Rust Crates You Use In Almost Every Project That They Are Practically An Extension of The Standard Library?

    4 projects | /r/rust | 22 Nov 2023
  • Iterating on Testing in Rust

    4 projects | news.ycombinator.com | 17 Jun 2023
  • Proptest strategies the hard way

    1 project | /r/rust | 6 Jun 2023
  • Generating combinatorial test cases

    1 project | /r/rust | 14 May 2023