TGViewer
codedump的电报频道 codedump的电报频道 @codedump_notes · 5.5K subscribers
Post #196 1.32K
#项目
G家出品的Go语言内存版本的Btree实现:https://github.com/google/btree

Btree这样的数据结构,更多是为了应付磁盘读写慢,所以设计成了每次读写磁盘的数量单位至少为一个物理页面。因此,要实现使用Btree的存储引擎,要加一个“页面管理器”模块,这个模块也可以用mmap来做,这些都在我之前的博客有涉及。

所以G家的这个内存版Btree实现,实际在项目里用的应该不多,因为如果定位是“内存里的容器”,有更多别的选择。但是嘛,拿来阅读理解Btree算法总还是不错的。

之所以看到这个项目,是因为这篇文章的推荐:

https://www.scylladb.com/2022/04/27/shaving-40-off-googles-b-tree-implementation-with-go-generics/
GitHub GitHub - google/btree: BTree provides a simple, ordered, in-memory data structure for Go programs. BTree provides a simple, ordered, in-memory data structure for Go programs. - google/btree
  • 👍 7
  • 👏 2
More from @codedump_notes
  1. Sep 27, 2026#系统编程 讲解Go语言并发主题的小书:《Go concurrency distilled》
  2. Sep 22, 2026#开源软件 开源本来承载的主要任务之一就是赢得信任,智谱这一把开源不但没有赢取信任,反而让更多人感到了疑问,比如我。
  3. Sep 22, 2026#开源项目 #Rust #数据库 hawdb:Rust编写的嵌入式图数据库,用于Nowledge产品中管理本地图数据。
  4. Sep 21, 2026#Rust #人工智能 最近看了好几个Rust相关的新闻,比如: * Rust在微软内部升级为一级语言:《Guest Post: Rust Is Tier-1 Language a…
  5. Sep 19, 2026#人工智能 这个翻译可以说是 信达雅 了。
  6. Sep 15, 2026#人工智能 《我不得不把才华埋葬在昨天》,Deepseek 核心开发的文章,也许再过一段时间,他就不用亲手写算子了。
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →