3 ms·
Because it's super slow and shared memory is super fast. And people generally prefer fast code rather than safe code.
by vbezhenar 9mo ago
Because it's super slow and shared memory is super fast. And people generally prefer fast code rather than safe code.
- gf000 9mo agoIt's not "super slow" and most languages do something very similar within concurrent data structures. Also, copy by value in itself is just a semantic requirement, it doesn't say how it's implemented. And shared mutable memory is pretty damn slow (given you are not fine with data race garbage), because atomic operations destroy caches. So it's the usual space-time tradeoff at the end of the day.