2 ms·
> is precisely what the Rust compiler checks for. Mutable shared state is required in many real-life cases. CPUs suffer heavy penalty for random RAM reads, ran
by Const-me 7y ago
> is precisely what the Rust compiler checks for.
Mutable shared state is required in many real-life cases. CPUs suffer heavy penalty for random RAM reads, random writes are free (especially when using MOVNT* instructions to bypass caches). When working on computational code you want to optimize for read access. This often means write patterns are random, i.e. you can’t slice arrays per compute thread.
> because these places are explicitly marked in the code, it's easier to audit them for bugs
C# has very good OOP support. All class members are private by default. Wrap that mutable shared state into a class with thread safe public API, will be equally easy to audit.