创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

bbtree 为 Rust 数据系统带来更快有序映射

AI 总结

bbtree 是一种新的 Rust 有序映射实现,设计重点是减少查找和插入时的缓存未命中。项目报告称,在四个 LSM-tree 系统中,它替代跳表后的性能提升为 1.37–6.83 倍;在 Turso 数据库索引对比中,插入和索引 SELECT 分别快 2.22 倍和 1.90 倍。报告还展示了从磁盘内存映射 bbtree 的方案,程序重启后无需重建。

深度见解

报告提供了 bbtree 在存储和数据库系统中的具体集成与基准测试,这些底层结构被用于智能体记忆、RAG 和 KV 存储等 AI 工作负载。

What can it do?

B-trees are the most important data structure in big data systems, a fast b-tree like bbtree benefits everything on top of it: agents memory, LLM training, RAG, KV store, state caching, vector search, and more.

Here we discuss three representative use cases:

  • Replace skiplist in LSM-trees. In place of the skiplist of four LSM-trees, bbtree is 1.37–6.83× faster.
  • In-memory database index. In place of Turso's skiplists, inserts are 2.22× and indexed SELECTs 1.90× faster.
  • Mmap a bbtree from disk. No rebuild after a restart: the first answer comes 160–2,500× sooner than std's BTreeMap.

All LSM-trees use an ordered map to hold recent writes in memory, the memtable. In Rust, this ordered map is usually a skiplist, like crossbeam-skiplist.

bbtree can easily replace it and is much faster. A skiplist takes a cache miss for almost every node it visits on its way down; a bbtree lookup touches a handful of cache lines (see How it works, below).

#bbtree#Rust#fjall#SlateDB#Tonbo#Lance MemWAL#Turso

原文约 12 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。