Posted in

Go实现流推送,为什么bufio.Writer.Write()比直接conn.Write()快3.8倍?——底层writev系统调用与TCP_NODELAY协同原理揭秘

第一章:Go实现流推送 流推送是 … Go实现流推送,为什么bufio.Writer.Write()比直接conn.Write()快3.8倍?——底层writev系统调用与TCP_NODELAY协同原理揭秘Read more

Posted in

Go接口设计总出问题?深度拆解io.Reader/io.Writer/context.Context三大核心接口的5种反模式(含重构前后Benchmark对比)

第一章:Go接口设计总出问题?深 … Go接口设计总出问题?深度拆解io.Reader/io.Writer/context.Context三大核心接口的5种反模式(含重构前后Benchmark对比)Read more

Posted in

Go原子操作的“可见性幻觉”:为什么atomic.LoadUint64读到旧值?MESI协议状态机+Go runtime write barrier联动解析

第一章:Go原子操作和锁的本质区 … Go原子操作的“可见性幻觉”:为什么atomic.LoadUint64读到旧值?MESI协议状态机+Go runtime write barrier联动解析Read more