Posted in

Go map零值陷阱:make(map[T]V, 0) vs make(map[T]V) vs nil map —— 编译期/运行期行为差异全图解

第一章:Go map零值陷阱的全 … Go map零值陷阱:make(map[T]V, 0) vs make(map[T]V) vs nil map —— 编译期/运行期行为差异全图解Read more

Posted in

Go map初始化的5种写法性能排名:make(map[int]int) vs make(map[int]int, 0) vs make(map[int]int, 1024),源码级解释第3名反直觉原因

第一章:Go map初始化的5种 … Go map初始化的5种写法性能排名:make(map[int]int) vs make(map[int]int, 0) vs make(map[int]int, 1024),源码级解释第3名反直觉原因Read more