Optimization to execute fewer memory barriers.