We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://tiancaiamao.gitbooks.io/go-internals/content/zh/02.3.html https://draveness.me/golang/docs/part2-foundation/ch03-datastructure/golang-hashmap/ https://dave.cheney.net/2018/05/29/how-the-go-runtime-implements-maps-efficiently-without-generics
这篇源于头条面试官问我map是怎么实现的,当时并没有看过。
面试官说go的实现很有特点,我在想这东西还能有什么特别的呢?
现在可以罗列一下比较special的点
hmap
maptype
keys
values
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Go - map implement
https://tiancaiamao.gitbooks.io/go-internals/content/zh/02.3.html
https://draveness.me/golang/docs/part2-foundation/ch03-datastructure/golang-hashmap/
https://dave.cheney.net/2018/05/29/how-the-go-runtime-implements-maps-efficiently-without-generics
这篇源于头条面试官问我map是怎么实现的,当时并没有看过。
面试官说go的实现很有特点,我在想这东西还能有什么特别的呢?
现在可以罗列一下比较special的点
hmap
+maptype
讲变化的部分抽象出来,就只需要对一个key,value对编译出来一个就行。 可以看出对性能,编译速度的考量。keys
,和values
分别放在一起还有padding, 就是考虑了字节对齐,cache补齐伪共享The text was updated successfully, but these errors were encountered: