4 ms·
Atomic operations on NUMA architectures are much more efficient than lock/unlock on the same memory. It's more expensive than no synchronization, but it's the
by bluejekyll 10y ago
Atomic operations on NUMA architectures are much more efficient than lock/unlock on the same memory.
It's more expensive than no synchronization, but it's the cheapest (that I know of) method of syncing state across threads and multiple CPU architectures.
The only thing cheaper is immutable structures, but those obviously limit your ability to change state across threads.
- loeg 10y agoYou can do some checks as non-atomic instructions too, with careful use of memory barriers.