Posted in

Go标准库隐藏彩蛋:`sync.Map`已过时?`sync/atomic.Value`+`unsafe.Pointer`实现零分配并发映射(Benchmark实测快2.8倍)

第一章:Go标准库隐藏彩蛋:sy … Go标准库隐藏彩蛋:sync.Map已过时?sync/atomic.Value+unsafe.Pointer实现零分配并发映射(Benchmark实测快2.8倍)Read more

Posted in

Go原子操作常见误用(atomic.LoadUint64 vs sync/atomic.Value):何时必须用StorePointer?unsafe.Pointer风险边界

第一章:Go原子操作的本质与内存 … Go原子操作常见误用(atomic.LoadUint64 vs sync/atomic.Value):何时必须用StorePointer?unsafe.Pointer风险边界Read more

Posted in

Go语言最新版内存模型微调影响深远:sync/atomic.Value行为变更导致竞态隐患,3个隐蔽case及静态检测规则

第一章:Go语言最新版内存模型微 … Go语言最新版内存模型微调影响深远:sync/atomic.Value行为变更导致竞态隐患,3个隐蔽case及静态检测规则Read more

Posted in

Go原子操作不是银弹!atomic.LoadUint64在x86/ARM一致性差异、缓存行伪共享、替代sync/atomic.Value场景决策树

第一章:Go原子操作不是银弹!a … Go原子操作不是银弹!atomic.LoadUint64在x86/ARM一致性差异、缓存行伪共享、替代sync/atomic.Value场景决策树Read more

Posted in

Go原子操作≠无锁编程:sync/atomic.Value、unsafe.Pointer、RWMutex三者在高并发读写场景下的吞吐量与缓存行伪共享实测报告

第一章:Go原子操作≠无锁编程: … Go原子操作≠无锁编程:sync/atomic.Value、unsafe.Pointer、RWMutex三者在高并发读写场景下的吞吐量与缓存行伪共享实测报告Read more