Re:A single line of code made a 24-core server slower than a...
by ericbarrett on Friday December 31, 2021 @11:33AM
(#29749581)
You're right if they're wrapped in an Arc<T>. But it's a lot easier to confidently clone an immutable data structure to threads/async functions because you know they won't be mutated by other cores. If you're cloning mutable data, you'll have to collect each "shard" at the end of whatever runtime loop your program has, and merge them back into the authoritative model. (Or drop the changes, but then why make the data mutable?) Gets hairy.
[ Parent
| on HN ]
There are no comments on this comment yet.