"Map types" section of the go language specification描述了映射类型的接口和一般用法,"Go maps in action" post on The Go Blog不经意地提到了哈希表和"快速查找、添加和删除".
current runtime/hashmap.go
source code将其实现描述为哈希表(通常是摊销的O(1)
);然而,我在语言规范或其他material 中看不到任何性能特征(如Big O性能)的保证.
Go语言是否做出了任何performance保证(例如,恒定时间插入/查找/删除?) map 类型还是只有interface个担保?(与Java语言相比,在Java语言中,interfaces和implementations是明显分开的.)