▲ | Kranar 5 days ago | ||||||||||||||||||||||||||||||||||
It's a common misconception to reason about memory models strictly in terms of hardware. Sequential consistency is a property of a programming language's semantics and can not simply be inferred from hardware. It is possible for hardware operations to all be SC but for the compiler to still provide weaker memory orderings through compiler specific optimizations. | |||||||||||||||||||||||||||||||||||
▲ | ibraheemdev 5 days ago | parent [-] | ||||||||||||||||||||||||||||||||||
I'm referring to the performance implications of the hardware instruction, not the programming language semantics. Incrementing or decrementing the reference count is going to require an RMW instruction, which is expensive on x86 regardless of the ordering. | |||||||||||||||||||||||||||||||||||
|