Posted in

map[string]struct{}真的比map[string]bool更省内存?实测Go 1.22下二者在100万键规模下的内存占用差值为0字节

第一章:Go语言中map[str … map[string]struct{}真的比map[string]bool更省内存?实测Go 1.22下二者在100万键规模下的内存占用差值为0字节Read more

Posted in

为什么map[int64]int比map[int32]int内存占用高17%?底层bucket结构体字段对齐与padding真实开销测算

第一章:Go map底层实现概览 … 为什么map[int64]int比map[int32]int内存占用高17%?底层bucket结构体字段对齐与padding真实开销测算Read more

Posted in

typeregistry map[string]reflect.Type内存碎片化实测:百万级注册后map bucket利用率低于32%的优化对策

第一章:typeregistry … typeregistry map[string]reflect.Type内存碎片化实测:百万级注册后map bucket利用率低于32%的优化对策Read more

Posted in

【Go Runtime机密文档】:map bucket slot复用的4个未公开约束(来自Go team内部设计评审会议纪要节选)

第一章:Go Runtime机密 … 【Go Runtime机密文档】:map bucket slot复用的4个未公开约束(来自Go team内部设计评审会议纪要节选)Read more